Re: [PATCH] usb: Use well-known descriptor sizes when parsing configuration

2024-07-01 Thread Sascha Hauer
On Mon, 01 Jul 2024 15:50:30 +0200, Ahmad Fatoum wrote: > This is a port of U-Boot commit eaf3e613ea6f0dc95c94a93997ad62785fe2969c: > > | Author: Julius Werner > | Date: Fri Jul 19 13:12:08 2013 -0700 > | > | usb: Use well-known descriptor sizes when parsing configuration > | > | Th

Re: [PATCH] commands: cpuinfo: Add Cortex-A55 information

2024-07-01 Thread Sascha Hauer
On Tue, 02 Jul 2024 08:00:25 +0300, Alexander Shiyan wrote: > Additionally, the indentation of spaces has been replaced by tabs. > > Applied, thanks! [1/1] commands: cpuinfo: Add Cortex-A55 information https://git.pengutronix.de/cgit/barebox/commit/?id=0ec1a2bcf2db (link may not be sta

Re: [PATCH] fixup! regulator: Add Fairchild FAN53555 driver

2024-07-01 Thread Sascha Hauer
On Mon, 01 Jul 2024 20:12:39 +0200, Ahmad Fatoum wrote: > GCC reports: > > drivers/regulator/fan53555.c:362:17: warning: ‘mode_reg’ may be used > uninitialized [-Wmaybe-uninitialized] > 362 | regmap_update_bits(di->rdev.regmap, mode_reg, > mode_mask, 0); > > Fix this by returni

Re: [PATCH master] clk: support inclusion of clk-provider.h in !COMMON_CLK code

2024-07-01 Thread Sascha Hauer
On Mon, 01 Jul 2024 20:12:30 +0200, Ahmad Fatoum wrote: > Most of the file is macros, but the little C code there is fails to > compile when built with !COMMON_CLK due to struct clk_div_table and > clk_hw_get_parent being undefined. > > Applied, thanks! [1/1] clk: support inclusion of clk-pro

[PATCH] commands: cpuinfo: Add Cortex-A55 information

2024-07-01 Thread Alexander Shiyan
Additionally, the indentation of spaces has been replaced by tabs. Signed-off-by: Alexander Shiyan --- arch/arm/cpu/cpuinfo.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/arch/arm/cpu/cpuinfo.c b/arch/arm/cpu/cpuinfo.c index 2d3fe2ac8d..ce5f010975 100

[PATCH master] clk: support inclusion of clk-provider.h in !COMMON_CLK code

2024-07-01 Thread Ahmad Fatoum
Most of the file is macros, but the little C code there is fails to compile when built with !COMMON_CLK due to struct clk_div_table and clk_hw_get_parent being undefined. Signed-off-by: Ahmad Fatoum --- include/linux/clk-provider.h | 2 ++ include/linux/clk.h | 6 ++ 2 files changed

[PATCH] fixup! regulator: Add Fairchild FAN53555 driver

2024-07-01 Thread Ahmad Fatoum
GCC reports: drivers/regulator/fan53555.c:362:17: warning: ‘mode_reg’ may be used uninitialized [-Wmaybe-uninitialized] 362 | regmap_update_bits(di->rdev.regmap, mode_reg, mode_mask, 0); Fix this by returning -EINVAL in that case, which is the error code used earlier if the vendo

[PATCH] usb: Use well-known descriptor sizes when parsing configuration

2024-07-01 Thread Ahmad Fatoum
This is a port of U-Boot commit eaf3e613ea6f0dc95c94a93997ad62785fe2969c: | Author: Julius Werner | Date: Fri Jul 19 13:12:08 2013 -0700 | | usb: Use well-known descriptor sizes when parsing configuration | | The existing USB configuration parsing code relies on the descriptors' | o

Re: [PATCH v2] ARM: dts: imx8mp-skov: describe RTC

2024-07-01 Thread Sascha Hauer
On Mon, 01 Jul 2024 09:52:32 +0200, Ahmad Fatoum wrote: > The kernel device trees for the platform already describe the RTC, so > let's do the same in barebox as well. > > Applied, thanks! [1/1] ARM: dts: imx8mp-skov: describe RTC https://git.pengutronix.de/cgit/barebox/commit/?id=0f914

Re: [PATCH master] ARM: fix OP-TEE DT reservation clashing with barebox area at endmem

2024-07-01 Thread Sascha Hauer
On Mon, 01 Jul 2024 12:08:59 +0200, Ahmad Fatoum wrote: > The barebox area reservation is meant to fix the issue of having gaps > between early barebox-related reservations that might be clobbered by > later calls to request_sdram_region(). > > The OP-TEE memory region, if it exists, is not a ba

Re: [PATCH v2 1/3] commands: edit: factor out getwinsize and export it for reuse

2024-07-01 Thread Sascha Hauer
On Mon, 01 Jul 2024 12:35:12 +0200, Ahmad Fatoum wrote: > This function is currently only used by the sedit command, but can be > useful for other "full-screen" commands as well. > > Applied, thanks! [1/3] commands: edit: factor out getwinsize and export it for reuse https://git.pengutr

Re: [PATCH v2] bbu: command: update via TFTP if no image given

2024-07-01 Thread Sascha Hauer
On Mon, 01 Jul 2024 12:22:29 +0200, Ahmad Fatoum wrote: > Booting barebox over TFTP is a common operation that even has a default > boot target: `boot bnet`. > > Once, a chainloaded barebox was tested to work, it may need to be > persisted, which needs a cumbersome: > > barebox_update /mnt/tf

Re: [RFC] spi: spi-fsl-qspi: fix dev_request_mem_resource() usage

2024-07-01 Thread Sascha Hauer
On Wed, 19 Jun 2024 00:33:57 +0300, Antony Pavlov wrote: > Here is the code from drivers/spi/spi-fsl-qspi.c: > > > res = dev_request_mem_resource(dev, 0); > > q->iobase = IOMEM(res->start); > > if (IS_ERR(q->iobase)) { > > ret = PTR_ERR(q->iobase); > > goto err_put_ctrl; > > } >

Re: [PATCH] images: gitignore more files

2024-07-01 Thread Sascha Hauer
On Wed, 19 Jun 2024 07:55:37 +0300, Antony Pavlov wrote: > Applied, thanks! [1/1] images: gitignore more files https://git.pengutronix.de/cgit/barebox/commit/?id=a53326440a6b (link may not be stable) Best regards, -- Sascha Hauer

Re: [PATCH] regulator: Add Fairchild FAN53555 driver

2024-07-01 Thread Sascha Hauer
On Fri, Jun 21, 2024 at 08:18:06AM +0300, Alexander Shiyan wrote: > This driver supports Fairchild FAN53555 Digitally Programmable TinyBuck > Regulator. > > Supported ICs: > fan53526, fan53555, rk8600, rk8602, syr827, syr828, tcs4525, tcs4526. > > The driver is written based on the fan53555.c li

Re: [PATCH] regulator: Add Fairchild FAN53555 driver

2024-07-01 Thread Sascha Hauer
On Fri, 21 Jun 2024 08:18:06 +0300, Alexander Shiyan wrote: > This driver supports Fairchild FAN53555 Digitally Programmable TinyBuck > Regulator. > > Supported ICs: > fan53526, fan53555, rk8600, rk8602, syr827, syr828, tcs4525, tcs4526. > > The driver is written based on the fan53555.c linux

Re: [PATCH] efi: payload: inform users on attempt to boot non EFI-stubbed kernel

2024-07-01 Thread Sascha Hauer
On Thu, 20 Jun 2024 09:16:16 +0200, Ahmad Fatoum wrote: > Calling bootm on an x86 kernel image that lacks an EFI stub will result > in a "no image handler found for image type MBR sector", which can be > very confusing. > > Improve upon this by directly suggesting that the kernel's > CONFIG_EFI_

Re: [PATCH] mfd: rk808: Abstracting childs from the interface being used

2024-07-01 Thread Sascha Hauer
On Fri, 21 Jun 2024 08:33:11 +0300, Alexander Shiyan wrote: > The patch is part of the preparation for adding the SPI interface support. > > Applied, thanks! [1/1] mfd: rk808: Abstracting childs from the interface being used https://git.pengutronix.de/cgit/barebox/commit/?id=ba02270e1fc

Re: [PATCH] mfd: rk808: Fix poweroff handler name

2024-07-01 Thread Sascha Hauer
On Thu, 20 Jun 2024 10:49:20 +0300, Alexander Shiyan wrote: > Applied, thanks! [1/1] mfd: rk808: Fix poweroff handler name https://git.pengutronix.de/cgit/barebox/commit/?id=af28a9d08323 (link may not be stable) Best regards, -- Sascha Hauer

Re: (subset) [PATCH v2 1/2] spi: atmel_spi: Fix GPIO-based chip select handling to support multiple valid entries

2024-07-01 Thread Sascha Hauer
On Sat, 22 Jun 2024 19:48:14 +0200, Oleksij Rempel wrote: > Current implementation of GPIO-based chip select configuration in this > driver only considers the first valid GPIO and ignores > subsequent entries. This patch ensures that all valid GPIO entries are > processed correctly, enabling conf

Re: [PATCH v2 2/2] ARM: at91: microchip-sama5d3-eds: implement MDIO and SPI extension boards detection

2024-07-01 Thread Sascha Hauer
Hi Oleksij, Some small nitpicks inside. On Sat, Jun 22, 2024 at 07:48:15PM +0200, Oleksij Rempel wrote: > +++ b/arch/arm/boards/microchip-sama5d3-eds/board.c > @@ -0,0 +1,414 @@ > +// SPDX-License-Identifier: GPL-2.0-or-later > +// SPDX-FileCopyrightText: 2024 Oleksij Rempel > + > +#include > +

Re: [PATCH] MIPS: use more consistent type for memory size values

2024-07-01 Thread Sascha Hauer
On Sun, 23 Jun 2024 23:46:53 +0300, Denis Orlov wrote: > Switch from using u32 to unsigned long for these. It is unlikely to be > actually utilized on 64-bit builds, but this feels a bit safer, > considering that we work with the whole register width (32 or 64 bit, > depending on the config setti

Re: [PATCH master] common: misc: do not run pollers inside panic()

2024-07-01 Thread Sascha Hauer
On Thu, 20 Jun 2024 14:58:29 +0200, Ahmad Fatoum wrote: > When panic() is not configured to hang, it will wait 100 ms for messages > to go out before trying to poweroff or reset the machine. > > The wait is implemented using udelay(), which runs pollers if the delay > duration exceeds 100 us. Th

Re: [PATCH 1/2] fixup! base: add class device support

2024-07-01 Thread Sascha Hauer
On Thu, 20 Jun 2024 14:55:47 +0200, Ahmad Fatoum wrote: > base: class: fix class_remove_device to not corrupt the class list > > class_remove_device is supposed to remove the device from the class, not > remove the class from its devices. > > Applied, thanks! [1/2] fixup! base: add class dev

Re: [PATCH 2/8] FIT: skip possible overlay config nodes

2024-07-01 Thread Sascha Hauer
On Wed, Jun 26, 2024 at 12:04:42PM +0200, Marco Felsch wrote: > On 24-06-17, Sascha Hauer wrote: > > On Tue, Jun 11, 2024 at 10:36:47AM +0200, Marco Felsch wrote: > > > Hi, > > > > > > sorry for the delay on this patchset. > > > > > > On 24-03-25, Sascha Hauer wrote: > > > > Hi Marco, > > > > >

[PATCH v2 3/3] commands: watch: add new command

2024-07-01 Thread Ahmad Fatoum
For testing proper operation of IIO devices, it can be useful to monitor changes in the reading reported by the hwmon command. This is now possible by using `watch -n 0.5 hwmon`. Signed-off-by: Ahmad Fatoum --- v1 -> v2: - return success when command is interrupted (Sascha) - free all allocat

[PATCH v2 2/3] lib: strtox: implement new simple_strtofract

2024-07-01 Thread Ahmad Fatoum
We have no floating point support in barebox and no strtod. Still some user interaction could benefit from being able to supply command arguments or device parameters in a format with decimal points. This new simple_strtofract() function parses a fixed point format consisting of a 32 bit integer a

[PATCH v2 1/3] commands: edit: factor out getwinsize and export it for reuse

2024-07-01 Thread Ahmad Fatoum
This function is currently only used by the sedit command, but can be useful for other "full-screen" commands as well. Signed-off-by: Ahmad Fatoum --- v1 -> v2: - no change --- commands/edit.c | 85 +++-- include/term.h | 8 + lib/Makefile|

Re: [PATCH v2] net: designware-imx: add fix_reset callback

2024-07-01 Thread Sascha Hauer
On Mon, 01 Jul 2024 08:14:19 +0200, Steffen Trumtrar wrote: > The i.MX93 needs to set the RMII speed to successfully reset. Add a > callback that does this inspired by the linux patch: > > net: stmmac: dwmac-imx: use platform specific reset for imx93 SoCs > commit b536f32b5b034f592df0f0b

Re: [PATCH] rtc: add PCF85063 RTC and NVMEM support

2024-07-01 Thread Sascha Hauer
On Mon, 01 Jul 2024 09:04:12 +0200, Ahmad Fatoum wrote: > Import the Linux v6.10-rc3 state of the RTC/NVMEM driver, so it can be > used to check wall time in barebox. > > Applied, thanks! [1/1] rtc: add PCF85063 RTC and NVMEM support https://git.pengutronix.de/cgit/barebox/commit/?id=1f

[PATCH v2] bbu: command: update via TFTP if no image given

2024-07-01 Thread Ahmad Fatoum
Booting barebox over TFTP is a common operation that even has a default boot target: `boot bnet`. Once, a chainloaded barebox was tested to work, it may need to be persisted, which needs a cumbersome: barebox_update /mnt/tftp/${global.user}-barebox-${global.hostname} Make this more straight-fo

Re: [PATCH] bbu: command: update via TFTP if no image given

2024-07-01 Thread Ahmad Fatoum
Hello Sascha, On 01.07.24 12:08, Sascha Hauer wrote: > On Mon, Jul 01, 2024 at 09:14:55AM +0200, Ahmad Fatoum wrote: >> Booting barebox over TFTP is a common operation that even has a default >> boot target: `boot bnet`. >> >> Once, a chainloaded barebox was tested to work, it may need to be >> pe

Re: [PATCH] fs: pstore: ram_core: use pr_err, not pr_info, for errors

2024-07-01 Thread Sascha Hauer
On Mon, 01 Jul 2024 09:05:47 +0200, Ahmad Fatoum wrote: > A failure in persistent_ram_init_ecc() ultimately results in > ramoops_probe() failing, so an error message is more appropriate than > the current info log level. > > Applied, thanks! [1/1] fs: pstore: ram_core: use pr_err, not pr_info

Re: [PATCH] mci: core: drop unused parameter members from struct mci

2024-07-01 Thread Sascha Hauer
On Mon, 01 Jul 2024 09:07:24 +0200, Ahmad Fatoum wrote: > We actually never check the device parameter points again in the MCI > core, so we don' need to keep them in struct mci. > > Applied, thanks! [1/1] mci: core: drop unused parameter members from struct mci https://git.pengutronix.

Re: [PATCH 1/2] include: gfp: move flags into

2024-07-01 Thread Sascha Hauer
On Mon, 01 Jul 2024 09:12:22 +0200, Ahmad Fatoum wrote: > The GFP arguments are unused in barebox and are only used to reduce > churn when porting kernel code. To make it easier to port code using > them in headers, move them to like Linux does. > > Applied, thanks! [1/2] include: gfp: move

[PATCH master] ARM: fix OP-TEE DT reservation clashing with barebox area at endmem

2024-07-01 Thread Ahmad Fatoum
The barebox area reservation is meant to fix the issue of having gaps between early barebox-related reservations that might be clobbered by later calls to request_sdram_region(). The OP-TEE memory region, if it exists, is not a barebox-related reservation and treating it as such will clash if the

Re: [PATCH] bbu: command: update via TFTP if no image given

2024-07-01 Thread Sascha Hauer
On Mon, Jul 01, 2024 at 09:14:55AM +0200, Ahmad Fatoum wrote: > Booting barebox over TFTP is a common operation that even has a default > boot target: `boot bnet`. > > Once, a chainloaded barebox was tested to work, it may need to be > persisted, which needs a cumbersome: > > barebox_update /mn

Re: [PATCH master] video: backlight: make brightness and slew time parameters unsigned

2024-07-01 Thread Sascha Hauer
On Mon, 01 Jul 2024 09:27:14 +0200, Ahmad Fatoum wrote: > Despite the backlight parameter being registered as uint32, > backlight_brightness_set took the brightness level as a signed value. > > This can lead to wrap around for very large values of brightness > supplied as device parameter and if

Re: [PATCH] fixup! base: add class device support

2024-07-01 Thread Sascha Hauer
On Mon, 01 Jul 2024 09:28:50 +0200, Ahmad Fatoum wrote: > driver: wrap class macro arguments in parenthesis > > Without the parenthesis, using & in the macro argument will lead to > issues. > > Applied, thanks! [1/1] fixup! base: add class device support https://git.pengutronix.de/cgit

barebox@lists.infradead.org

2024-07-01 Thread Sascha Hauer
On Mon, 01 Jul 2024 09:32:13 +0200, Ahmad Fatoum wrote: > The Rockchip pinctrl binding can not only mux pins as GPIOs and > configure the bias, but also configure the direction and whether it's > high/low for outputs and schmitt trigger for inputs. > > This is used in some device trees to enable

Re: [PATCH master] bitops: change test_bit return type from int to bool

2024-07-01 Thread Sascha Hauer
On Mon, 01 Jul 2024 09:35:09 +0200, Ahmad Fatoum wrote: > test_bit currently returns some positive integer on success and don't > enforce the return values to be either false or true. > > This can lead to problems if the return value is not used for > truthiness, but in arithmetic. > > This see

Re: [PATCH 1/3] e1000: mtd: remove needless error checking for device parameter

2024-07-01 Thread Sascha Hauer
On Mon, 01 Jul 2024 09:35:24 +0200, Ahmad Fatoum wrote: > The invm device is specifically created for the EEPROM, so adding a > parameter should not result in a name clash. > > This leaves only -ENOMEM as possible error. As the driver is usable > without EEPROM being writable, don't propagate th

Re: [PATCH] of: platform: early exit on error

2024-07-01 Thread Sascha Hauer
On Mon, 01 Jul 2024 09:38:22 +0200, Ahmad Fatoum wrote: > This introduces no functional change, but aligns us with the coding > style, where early exits are preferred and the final return is the > successful one. > > Applied, thanks! [1/1] of: platform: early exit on error https://git.p

Re: [PATCH] rtc: register RTC class to collect devices

2024-07-01 Thread Sascha Hauer
On Mon, 01 Jul 2024 09:43:25 +0200, Ahmad Fatoum wrote: > We already have an RTC class device, so by using struct class, we can > drop the list member in struct rtc_device and make it possible to list > the device using the class command. > > Applied, thanks! [1/1] rtc: register RTC class to

Re: [PATCH 3/3] commands: watch: add new command

2024-07-01 Thread Sascha Hauer
On Mon, Jul 01, 2024 at 09:54:34AM +0200, Ahmad Fatoum wrote: > For testing proper operation of IIO devices, it can be useful to monitor > changes in the reading reported by the hwmon command. This is now > possible by using `watch -n 0.5 -t hwmon`. > > Signed-off-by: Ahmad Fatoum > --- > comman

Re: [PATCH] Documentation: boards: stm32mp: describe location of DIP switch

2024-07-01 Thread Sascha Hauer
On Mon, 01 Jul 2024 10:48:25 +0200, Ahmad Fatoum wrote: > ChatGPT can explain ASCII art, but without information about the > position, it's not as useful for a blind user. > > Extend the docs, so it's more useful in that case. > > Applied, thanks! [1/1] Documentation: boards: stm32mp: descri

[PATCH] Documentation: boards: stm32mp: describe location of DIP switch

2024-07-01 Thread Ahmad Fatoum
ChatGPT can explain ASCII art, but without information about the position, it's not as useful for a blind user. Extend the docs, so it's more useful in that case. Signed-off-by: Ahmad Fatoum --- Documentation/boards/stm32mp.rst | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff -

[PATCH 3/3] commands: watch: add new command

2024-07-01 Thread Ahmad Fatoum
For testing proper operation of IIO devices, it can be useful to monitor changes in the reading reported by the hwmon command. This is now possible by using `watch -n 0.5 -t hwmon`. Signed-off-by: Ahmad Fatoum --- commands/Kconfig | 6 +++ commands/Makefile | 1 + commands/watch.c | 97 +

[PATCH 2/3] lib: strtox: implement new simple_strtofract

2024-07-01 Thread Ahmad Fatoum
We have no floating point support in barebox and no strtod. Still some user interaction could benefit from being able to supply command arguments or device parameters in a format with decimal points. This new simple_strtofract() function parses a fixed point format consisting of a 32 bit integer a

[PATCH 1/3] commands: edit: factor out getwinsize and export it for reuse

2024-07-01 Thread Ahmad Fatoum
This function is currently only used by the sedit command, but can be useful for other "full-screen" commands as well. Signed-off-by: Ahmad Fatoum --- commands/edit.c | 85 +++-- include/term.h | 8 + lib/Makefile| 1 + lib/term.c | 69

[PATCH 0/3] commands: watch: add new command

2024-07-01 Thread Ahmad Fatoum
For testing proper operation of IIO devices, it can be useful to monitor changes in the reading reported by the hwmon command. This is now possible by using e.g. `watch -n 0.5 -t hwmon`. Ahmad Fatoum (3): commands: edit: factor out getwinsize and export it for reuse lib: strtox: implement new

[PATCH v2] ARM: dts: imx8mp-skov: describe RTC

2024-07-01 Thread Ahmad Fatoum
The kernel device trees for the platform already describe the RTC, so let's do the same in barebox as well. Signed-off-by: Ahmad Fatoum --- v1 -> v2: - fix pinmux broken by last-minute I2C GPIO change.. --- arch/arm/dts/imx8mp-skov.dts | 40 1 file changed,

[PATCH] rtc: register RTC class to collect devices

2024-07-01 Thread Ahmad Fatoum
We already have an RTC class device, so by using struct class, we can drop the list member in struct rtc_device and make it possible to list the device using the class command. Signed-off-by: Ahmad Fatoum --- drivers/rtc/class.c | 10 ++ include/linux/rtc.h | 1 - 2 files changed, 6 ins

[PATCH] of: platform: early exit on error

2024-07-01 Thread Ahmad Fatoum
This introduces no functional change, but aligns us with the coding style, where early exits are preferred and the final return is the successful one. Signed-off-by: Ahmad Fatoum --- drivers/of/platform.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers

[PATCH 1/3] e1000: mtd: remove needless error checking for device parameter

2024-07-01 Thread Ahmad Fatoum
The invm device is specifically created for the EEPROM, so adding a parameter should not result in a name clash. This leaves only -ENOMEM as possible error. As the driver is usable without EEPROM being writable, don't propagate the error. Signed-off-by: Ahmad Fatoum --- drivers/net/e1000/mtd.c

[PATCH 3/3] fpga: bridge: remove needless error checking for device parameter

2024-07-01 Thread Ahmad Fatoum
The bridge device is specifically created for purposes of the FPGA bridge framework. There should thus be no naming clashes and -ENOMEM is not a fatal error there either, because the PWM C API is still usable without the device parameters. Signed-off-by: Ahmad Fatoum --- drivers/fpga/fpga-bridge

[PATCH 2/3] PWM: core: remove needless error checking for device parameter

2024-07-01 Thread Ahmad Fatoum
The PWM device is specifically created for purposes of the PWM framework. There should thus be no naming clashes and -ENOMEM is not a fatal error there either, because the PWM C API is still usable without the device parameters. Signed-off-by: Ahmad Fatoum --- drivers/pwm/core.c | 25 +--

[PATCH master] bitops: change test_bit return type from int to bool

2024-07-01 Thread Ahmad Fatoum
test_bit currently returns some positive integer on success and don't enforce the return values to be either false or true. This can lead to problems if the return value is not used for truthiness, but in arithmetic. This seems to be the case only in KASAN code, where it's used to count errors. C

[PATCH 5/7] pinctrl: rockchip: add support for bias-pull-pin-default

2024-07-01 Thread Ahmad Fatoum
The older rk3128, rk3036 and rk3066a SoCs only supported a pin-function-specific default bias as well as disabling bias with no way to manually choose whether the bias should be a pull-up or a pull-down. We wrongly treated this as if there is no bias, so let's fix that. Signed-off-by: Ahmad Fatou

barebox@lists.infradead.org

2024-07-01 Thread Ahmad Fatoum
The Rockchip pinctrl binding can not only mux pins as GPIOs and configure the bias, but also configure the direction and whether it's high/low for outputs and schmitt trigger for inputs. This is used in some device trees to enable peripherals as a finer grained gpio-hog. This series adds that sup

[PATCH 1/7] pinctrl: import header

2024-07-01 Thread Ahmad Fatoum
The header is an integral part of the Linux pinctrl support, because pinctrl drivers parse the device tree into the packed format described by it and receive the same format later when a pinctrl state needs to be selected. We don't follow this same procedure in barebox and instead parse pinctrl en

[PATCH 3/7] pinctrl: rockchip: use of_property_read_bool()

2024-07-01 Thread Ahmad Fatoum
No Rockchip device tree actually sets a value for these properties and neither kernel or barebox driver cares about the property value. Thus replace of_property_read_u32 with of_property_read_bool for simplification. Signed-off-by: Ahmad Fatoum --- drivers/pinctrl/pinctrl-rockchip.c | 8 +++

[PATCH 7/7] pinctrl: rockchip: add support for configuring GPIO direction

2024-07-01 Thread Ahmad Fatoum
The Rockchip pinctrl binding can not only mux pins as GPIOs and configure the bias, but also configure the direction. This is used in some device trees to enable peripherals as a finer grained gpio-hog. In Linux, this is implemented by keeping a list of deferred pin configs, but for barebox, let'

[PATCH 2/7] pinctrl: rockchip: make use of pinconf-generic.h

2024-07-01 Thread Ahmad Fatoum
So far we defined our own enum to record what bias was indicated by the device tree properties. Now that we have imported the upstream enum definition, make use of it to make syncs with Linux easier. While at it, we replace one usage of RK_BIAS_PULL_UP with `1'. That they were equal before was a c

[PATCH 6/7] gpiolib: implement of_gpio_get_chip_by_alias

2024-07-01 Thread Ahmad Fatoum
Rockchip pinctrl binding can configure GPIO direction, so let's add a function that returns a gpio_chip that can be used for this. Signed-off-by: Ahmad Fatoum --- drivers/gpio/gpiolib.c | 19 +++ include/gpio.h | 6 ++ 2 files changed, 25 insertions(+) diff --git a/

[PATCH 4/7] pinctrl: rockchip: add support for configuring schmitt trigger

2024-07-01 Thread Ahmad Fatoum
We had code to calculate the register layout for setting schmitt triggers on pins, but it was not actually used. Fix this and start parsing the input-schmitt-enable/disable properties. Signed-off-by: Ahmad Fatoum --- drivers/pinctrl/pinctrl-rockchip.c | 40 ++ 1 file

[PATCH] fixup! base: add class device support

2024-07-01 Thread Ahmad Fatoum
driver: wrap class macro arguments in parenthesis Without the parenthesis, using & in the macro argument will lead to issues. Signed-off-by: Ahmad Fatoum --- include/device.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/device.h b/include/device.h index d8d1f7

[PATCH 1/2] sandbox: io: alias first page of I/O memory to I/O port space

2024-07-01 Thread Ahmad Fatoum
We already emulate 64KiB of port space by directing (in|out)[bwl] accesses to the __pci_iobase static array. By have (read|write)[bwlq] access the first 4K of that port space when trying to access the NULL page. That way generic drivers like e.g. pinctrl-single can be trivially described in the d

[PATCH 2/2] sandbox: add dummy pinctrl nodes

2024-07-01 Thread Ahmad Fatoum
Now that MMIO addresses 0-1023 point at valid memory, let's use it describe a fake pinctrl-single controller. This allows testing common pinctrl code in sandbox. Device parameter support to select the state will follow later. Signed-off-by: Ahmad Fatoum --- arch/sandbox/dts/sandbox.dts | 53 +++

[PATCH master] video: backlight: make brightness and slew time parameters unsigned

2024-07-01 Thread Ahmad Fatoum
Despite the backlight parameter being registered as uint32, backlight_brightness_set took the brightness level as a signed value. This can lead to wrap around for very large values of brightness supplied as device parameter and if this results in a negative brightness, the function appears to hang

[PATCH] ARM: dts: imx8mp-skov: describe RTC

2024-07-01 Thread Ahmad Fatoum
The kernel device trees for the platform already describe the RTC, so let's do the same in barebox as well. Signed-off-by: Ahmad Fatoum --- arch/arm/dts/imx8mp-skov.dts | 39 1 file changed, 39 insertions(+) diff --git a/arch/arm/dts/imx8mp-skov.dts b/arch/a

[PATCH] bbu: command: update via TFTP if no image given

2024-07-01 Thread Ahmad Fatoum
Booting barebox over TFTP is a common operation that even has a default boot target: `boot bnet`. Once, a chainloaded barebox was tested to work, it may need to be persisted, which needs a cumbersome: barebox_update /mnt/tftp/${global.user}-barebox-${global.hostname} Make this more straight-fo

[PATCH 2/2] include: common.h: move barebox version/info declarations to new header

2024-07-01 Thread Ahmad Fatoum
Including all of common.h just to get the barebox version is overkill. Let's move the version/info declarations into a separate header that can be used instead. Signed-off-by: Ahmad Fatoum --- include/barebox-info.h | 31 +++ include/common.h | 23 +-

[PATCH 1/2] include: gfp: move flags into

2024-07-01 Thread Ahmad Fatoum
The GFP arguments are unused in barebox and are only used to reduce churn when porting kernel code. To make it easier to port code using them in headers, move them to like Linux does. Signed-off-by: Ahmad Fatoum --- include/linux/gfp.h | 12 include/linux/slab.h | 7 +-- 2 fi

[PATCH] mci: core: drop unused parameter members from struct mci

2024-07-01 Thread Ahmad Fatoum
We actually never check the device parameter points again in the MCI core, so we don' need to keep them in struct mci. Signed-off-by: Ahmad Fatoum --- drivers/mci/mci-core.c | 14 ++ include/mci.h | 2 -- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/drive

[PATCH] fs: pstore: ram_core: use pr_err, not pr_info, for errors

2024-07-01 Thread Ahmad Fatoum
A failure in persistent_ram_init_ecc() ultimately results in ramoops_probe() failing, so an error message is more appropriate than the current info log level. Signed-off-by: Ahmad Fatoum --- fs/pstore/ram_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/pstore/ram_co

[PATCH] rtc: add PCF85063 RTC and NVMEM support

2024-07-01 Thread Ahmad Fatoum
Import the Linux v6.10-rc3 state of the RTC/NVMEM driver, so it can be used to check wall time in barebox. Signed-off-by: Ahmad Fatoum --- drivers/rtc/Kconfig| 14 ++ drivers/rtc/Makefile | 2 + drivers/rtc/nvmem.c| 29 +++ drivers/rtc/rtc-pcf85063.c | 473 +