Re: [PATCH RFC] hw/sh4/sh7750: Add STBCR/STBCR2 register support

2023-10-19 Thread Geert Uytterhoeven
Hi Sato-san, On Thu, Oct 19, 2023 at 4:03 AM Yoshinori Sato wrote: > On Wed, 18 Oct 2023 21:40:23 +0900, > Geert Uytterhoeven wrote: > > The new Linux SH7750 clock driver uses the registers for power-down > > mode control, causing a crash: > > > >

Re: [PATCH RFC] hw/sh4/sh7750: Add STBCR/STBCR2 register support

2023-10-18 Thread Geert Uytterhoeven
Hi Adrian, On Wed, Oct 18, 2023 at 2:46 PM John Paul Adrian Glaubitz wrote: > On Wed, 2023-10-18 at 14:40 +0200, Geert Uytterhoeven wrote: > > The new Linux SH7750 clock driver uses the registers for power-down > > mode control, causing a crash: > > > > b

[PATCH RFC] hw/sh4/sh7750: Add STBCR/STBCR2 register support

2023-10-18 Thread Geert Uytterhoeven
The new Linux SH7750 clock driver uses the registers for power-down mode control, causing a crash: byte read to SH7750_STBCR_A7 (0x1fc4) not supported Aborted (core dumped) Fix this by adding support for the Standby Control Registers STBCR and STBCR2. Signed-off-by: Geert

Re: [PATCH v2] m68k: virt: pass RNG seed via bootinfo block

2022-07-06 Thread Geert Uytterhoeven
The link > contains the corresponding Linux patch. > > Link: https://lore.kernel.org/lkml/20220626111509.330159-1-ja...@zx2c4.com/ > Based-on: <20220625152318.120849-1-ja...@zx2c4.com> > Reviewed-by: Laurent Vivier > Signed-off-by: Jason A. Donenfeld Rev

Re: [RFC PATCH 3/3] hw/openrisc: Add the OpenRISC virtual machine

2022-06-07 Thread Geert Uytterhoeven
CC arnd On Sun, Jun 5, 2022 at 9:32 AM Stafford Horne wrote: > On Sun, Jun 05, 2022 at 10:58:14AM +0900, Stafford Horne wrote: > > On Fri, Jun 03, 2022 at 09:05:09AM +0200, Geert Uytterhoeven wrote: > > > On Thu, Jun 2, 2022 at 9:59 PM Stafford Horne wrote: > > > >

Re: [RFC PATCH 3/3] hw/openrisc: Add the OpenRISC virtual machine

2022-06-03 Thread Geert Uytterhoeven
Hi Stafford, On Thu, Jun 2, 2022 at 9:59 PM Stafford Horne wrote: > On Thu, Jun 02, 2022 at 09:08:52PM +0200, Geert Uytterhoeven wrote: > > On Thu, Jun 2, 2022 at 1:42 PM Joel Stanley wrote: > > > On Fri, 27 May 2022 at 17:27, Stafford Horne wrote: > > > > This

Re: [RFC PATCH 3/3] hw/openrisc: Add the OpenRISC virtual machine

2022-06-02 Thread Geert Uytterhoeven
little endian. Unfortunately m68k got this wrong, cfr. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2e2ac4a3327479f7e2744cdd88a5c823f2057bad Please don't duplicate this bad behavior for new architectures. Gr{oetje,eeting}s, Geert -- Geert

Re: [PATCH QEMU v2 4/5] ARM: PL061: Add gpiodev support

2020-07-16 Thread Geert Uytterhoeven
Hi Philippe, On Thu, Apr 23, 2020 at 12:08 PM Philippe Mathieu-Daudé wrote: > On 4/23/20 11:33 AM, Philippe Mathieu-Daudé wrote: > > On 4/23/20 11:01 AM, Geert Uytterhoeven wrote: > >> Make the PL061 GPIO controller user-creatable, and allow the user to tie > >> a

Re: [PATCH] hw/arm/virt: Fix PL061 node name and properties

2020-05-29 Thread Geert Uytterhoeven
Hi Peter, CC Rob, who made these properties mandatory in the pl061 DT bindings. On Fri, May 22, 2020 at 11:30 AM Peter Maydell wrote: > On Fri, 22 May 2020 at 09:29, Geert Uytterhoeven wrote: > > On Thu, May 21, 2020 at 6:59 PM Peter Maydell > > wrote: > > > On T

Re: [PATCH] hw/arm/virt: Fix PL061 node name and properties

2020-05-22 Thread Geert Uytterhoeven
Hi Peter, On Thu, May 21, 2020 at 6:59 PM Peter Maydell wrote: > On Tue, 19 May 2020 at 09:49, Geert Uytterhoeven > wrote: > > Make the created node comply with the PL061 Device Tree bindings: > > - Use generic node name "gpio" instead of "pl061", >

Re: [PATCH v7 0/6] gpio: Add GPIO Aggregator

2020-05-20 Thread Geert Uytterhoeven
Hi Andy, On Wed, May 20, 2020 at 2:41 PM Andy Shevchenko wrote: > On Wed, May 20, 2020 at 3:40 PM Andy Shevchenko > wrote: > > On Wed, May 20, 2020 at 3:38 PM Geert Uytterhoeven > > wrote: > > > On Wed, May 20, 2020 at 2:14 PM Andy Shevchenko > > > wrote

Re: [PATCH v7 0/6] gpio: Add GPIO Aggregator

2020-05-20 Thread Geert Uytterhoeven
Hi Andy, On Wed, May 20, 2020 at 2:14 PM Andy Shevchenko wrote: > On Mon, May 11, 2020 at 04:52:51PM +0200, Geert Uytterhoeven wrote: > > GPIO controllers are exported to userspace using /dev/gpiochip* > > character devices. Access control to these devices is provided by > &g

[PATCH] ARM: PL061: Introduce N_GPIOS

2020-05-19 Thread Geert Uytterhoeven
Add a definition for the number of GPIO lines controlled by a PL061 instance, and use it instead of the hardcoded magic value 8. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Geert Uytterhoeven --- hw/gpio/pl061.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff

[PATCH] hw/arm/virt: Fix PL061 node name and properties

2020-05-19 Thread Geert Uytterhoeven
Make the created node comply with the PL061 Device Tree bindings: - Use generic node name "gpio" instead of "pl061", - Add missing "#interrupt-cells" and "interrupt-controller" properties. Signed-off-by: Geert Uytterhoeven --- Split off from

Re: [PATCH v7 0/6] gpio: Add GPIO Aggregator

2020-05-18 Thread Geert Uytterhoeven
... Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say &qu

[PATCH v7 0/6] gpio: Add GPIO Aggregator

2020-05-11 Thread Geert Uytterhoeven
er.be/) [8] "[PATCH RFC] gpio: Add Virtual Aggregator GPIO Driver" (https://lore.kernel.org/r/20190705160536.12047-1-geert+rene...@glider.be/) [9] "[PATCH QEMU POC] Add a GPIO backend" (https://lore.kernel.org/r/20181003152521.23144-1-geert+rene...@glider.be/)

[PATCH v7 5/6] docs: gpio: Add GPIO Aggregator documentation

2020-05-11 Thread Geert Uytterhoeven
Document the GPIO Aggregator, and the two typical use-cases. Signed-off-by: Geert Uytterhoeven Reviewed-by: Ulrich Hecht Reviewed-by: Eugeniu Rosca Tested-by: Eugeniu Rosca --- v7: - No changes, v6: - Fix "allows" without object: -> provides a mechanism to ag

[PATCH v7 3/6] gpiolib: Add support for GPIO lookup by line name

2020-05-11 Thread Geert Uytterhoeven
clear that this field can have two meanings, and update the kerneldoc and GPIO_LOOKUP*() macros. Signed-off-by: Geert Uytterhoeven Reviewed-by: Ulrich Hecht Reviewed-by: Eugeniu Rosca Tested-by: Eugeniu Rosca --- v7: - Document non-uniqueness of line names, - Rebase on top of commit

[PATCH v7 2/6] mfd: sm501: Use GPIO_LOOKUP_IDX() helper macro

2020-05-11 Thread Geert Uytterhoeven
i801_add_mux() fills in the GPIO lookup table by manually populating an array of gpiod_lookup structures. Use the existing GPIO_LOOKUP_IDX() helper macro instead, to relax a dependency on the gpiod_lookup structure's member names. Signed-off-by: Geert Uytterhoeven Acked-by: Lee Jones -

[PATCH v7 6/6] MAINTAINERS: Add GPIO Aggregator section

2020-05-11 Thread Geert Uytterhoeven
Add a maintainership section for the GPIO Aggregator, covering documentation and driver source code. Signed-off-by: Geert Uytterhoeven Reviewed-by: Eugeniu Rosca Tested-by: Eugeniu Rosca --- v7: - Maintained => Supported, v6: - No changes, v5: - Add Reviewed-by, Tested-by,

[PATCH v7 4/6] gpio: Add GPIO Aggregator

2020-05-11 Thread Geert Uytterhoeven
or virtual machine. - Generic GPIO Driver This is useful for industrial control, where it can provide userspace access to a simple GPIO-operated device described in DT, cfr. e.g. spidev for SPI-operated devices. Signed-off-by: Geert Uytterhoeven Reviewed-by: Eugeniu Rosca Tested-by

[PATCH v7 1/6] i2c: i801: Use GPIO_LOOKUP() helper macro

2020-05-11 Thread Geert Uytterhoeven
i801_add_mux() fills in the GPIO lookup table by manually populating an array of gpiod_lookup structures. Use the existing GPIO_LOOKUP() helper macro instead, to relax a dependency on the gpiod_lookup structure's member names. Signed-off-by: Geert Uytterhoeven Reviewed-by: Jean De

Re: [PATCH v6 4/8] gpiolib: Add support for GPIO lookup by line name

2020-05-11 Thread Geert Uytterhoeven
Hi Linus, On Thu, Mar 26, 2020 at 10:18 PM Linus Walleij wrote: > On Tue, Mar 24, 2020 at 2:57 PM Geert Uytterhoeven > wrote: > > Currently a GPIO lookup table can only refer to a specific GPIO by a > > tuple, consisting of a GPIO controller label and a GPIO offset inside

Re: [PATCH QEMU v2 3/5] Add a GPIO backend using libgpiod

2020-04-23 Thread Geert Uytterhoeven
Hi Philippe, Thanks for your comments! On Thu, Apr 23, 2020 at 11:28 AM Philippe Mathieu-Daudé wrote: > On 4/23/20 11:01 AM, Geert Uytterhoeven wrote: > > Add a GPIO controller backend, to connect virtual GPIOs on the guest to > > physical GPIOs on the host. This allows the g

[PATCH QEMU v2 2/5] ARM: PL061: Extract pl061_create_fdt()

2020-04-23 Thread Geert Uytterhoeven
uot;#interrupt-cells" and "interrupt-controller" properties. Signed-off-by: Geert Uytterhoeven --- v2: - New. --- hw/arm/virt.c | 20 +++- hw/gpio/pl061.c | 42 + include/hw/gpio/pl061.h | 7 ++

[PATCH QEMU v2 5/5] hw/arm/virt: Add dynamic PL061 GPIO support

2020-04-23 Thread Geert Uytterhoeven
Add support for dynamically instantiating PL061 GPIO controller instances in ARM virt. Device tree nodes are created dynamically. Signed-off-by: Geert Uytterhoeven --- v2: - New. --- hw/arm/sysbus-fdt.c | 18 ++ hw/arm/virt.c | 1 + 2 files changed, 19 insertions

[PATCH QEMU v2 1/5] ARM: PL061: Move TYPE_PL061 to hw/gpio/pl061.h

2020-04-23 Thread Geert Uytterhoeven
Move the definition of TYPE_PL061 to a new header file, so it can be used outside the driver. Signed-off-by: Geert Uytterhoeven --- v2: - New. --- MAINTAINERS | 1 + hw/gpio/pl061.c | 2 +- include/hw/gpio/pl061.h | 16 3 files changed, 18 insertions

[PATCH QEMU v2 0/5] Add a GPIO backend

2020-04-23 Thread Geert Uytterhoeven
(https://lore.kernel.org/linux-gpio/20181003152521.23144-1-geert+rene...@glider.be/) [3] "Getting To Blinky: Virt Edition / Making device pass-through work on embedded ARM" (https://fosdem.org/2019/schedule/event/vai_getting_to_blinky/) Geert Uytterhoeven (5): ARM: PL061: Mo

[PATCH QEMU v2 3/5] Add a GPIO backend using libgpiod

2020-04-23 Thread Geert Uytterhoeven
, - The number of GPIO lines mapped is limited to the number of GPIO lines available on the virtual GPIO controller. Future work: - GPIO inputs, - GPIO line configuration, - Optimizations for controlling multiple GPIO lines at once, - ... Signed-off-by: Geert Uytterhoeven --- v2

[PATCH QEMU v2 4/5] ARM: PL061: Add gpiodev support

2020-04-23 Thread Geert Uytterhoeven
: Geert Uytterhoeven --- v2: - New. --- hw/gpio/pl061.c | 35 +++ qemu-options.hx | 9 + 2 files changed, 44 insertions(+) diff --git a/hw/gpio/pl061.c b/hw/gpio/pl061.c index 74ba733a8a5e8ca5..98204f9a586ae8c8 100644 --- a/hw/gpio/pl061.c +++ b/hw/gpio

Re: [PATCH v6 5/8] gpiolib: Introduce gpiod_set_config()

2020-03-27 Thread Geert Uytterhoeven
Hi Linus, On Thu, Mar 26, 2020 at 10:26 PM Linus Walleij wrote: > On Tue, Mar 24, 2020 at 2:57 PM Geert Uytterhoeven > wrote: > > The GPIO Aggregator will need a method to forward a .set_config() call > > to its parent gpiochip. This requires obtaining the gpio_chip and >

[PATCH v6 6/8] gpio: Add GPIO Aggregator

2020-03-24 Thread Geert Uytterhoeven
or virtual machine. - Generic GPIO Driver This is useful for industrial control, where it can provide userspace access to a simple GPIO-operated device described in DT, cfr. e.g. spidev for SPI-operated devices. Signed-off-by: Geert Uytterhoeven Reviewed-by: Eugeniu Rosca Tested-by

[PATCH v6 3/8] mfd: sm501: Use GPIO_LOOKUP_IDX() helper macro

2020-03-24 Thread Geert Uytterhoeven
i801_add_mux() fills in the GPIO lookup table by manually populating an array of gpiod_lookup structures. Use the existing GPIO_LOOKUP_IDX() helper macro instead, to relax a dependency on the gpiod_lookup structure's member names. Signed-off-by: Geert Uytterhoeven Cc: Lee Jones --- While

[PATCH v6 1/8] ARM: integrator: impd1: Use GPIO_LOOKUP() helper macro

2020-03-24 Thread Geert Uytterhoeven
impd1_probe() fills in the GPIO lookup table by manually populating an array of gpiod_lookup structures. Use the existing GPIO_LOOKUP() helper macro instead, to relax a dependency on the gpiod_lookup structure's member names. Signed-off-by: Geert Uytterhoeven Cc: linux-ar

[PATCH v6 2/8] i2c: i801: Use GPIO_LOOKUP() helper macro

2020-03-24 Thread Geert Uytterhoeven
i801_add_mux() fills in the GPIO lookup table by manually populating an array of gpiod_lookup structures. Use the existing GPIO_LOOKUP() helper macro instead, to relax a dependency on the gpiod_lookup structure's member names. Signed-off-by: Geert Uytterhoeven Cc: Jean Delvare Cc:

[PATCH v6 7/8] docs: gpio: Add GPIO Aggregator documentation

2020-03-24 Thread Geert Uytterhoeven
Document the GPIO Aggregator, and the two typical use-cases. Signed-off-by: Geert Uytterhoeven Reviewed-by: Ulrich Hecht Reviewed-by: Eugeniu Rosca Tested-by: Eugeniu Rosca --- v6: - Fix "allows" without object: -> provides a mechanism to aggregate GPIOs, ->

[PATCH v6 4/8] gpiolib: Add support for GPIO lookup by line name

2020-03-24 Thread Geert Uytterhoeven
: Geert Uytterhoeven Reviewed-by: Ulrich Hecht Reviewed-by: Eugeniu Rosca Tested-by: Eugeniu Rosca --- v6: - Update Documentation/driver-api/gpio/board.rst, - Reword rationale, v5: - Add Reviewed-by, Tested-by, v4: - Add Reviewed-by, - Rename gpiod_lookup.chip_label. - Use U16_MAX

[PATCH v6 5/8] gpiolib: Introduce gpiod_set_config()

2020-03-24 Thread Geert Uytterhoeven
-off-by: Geert Uytterhoeven --- v6: - New. --- drivers/gpio/gpiolib.c| 28 ++-- include/linux/gpio/consumer.h | 8 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index c756602e249c052e

[PATCH v6 8/8] MAINTAINERS: Add GPIO Aggregator section

2020-03-24 Thread Geert Uytterhoeven
Add a maintainership section for the GPIO Aggregator, covering documentation and driver source code. Signed-off-by: Geert Uytterhoeven Reviewed-by: Eugeniu Rosca Tested-by: Eugeniu Rosca --- v6: - No changes, v5: - Add Reviewed-by, Tested-by, v4: - Drop controversial GPIO repeater, v3

[PATCH v6 0/8] gpio: Add GPIO Aggregator

2020-03-24 Thread Geert Uytterhoeven
| 6 +- drivers/mfd/sm501.c | 24 +- include/linux/gpio/consumer.h | 8 + include/linux/gpio/machine.h | 15 +- 13 files changed, 776 insertions(+), 48 deletions(-) create mode 100644 Documentation/admin-guide/gpio/gpio-aggregator.rst

Re: [PATCH v5 3/5] gpio: Add GPIO Aggregator

2020-03-17 Thread Geert Uytterhoeven
On Tue, Feb 18, 2020 at 4:18 PM Geert Uytterhoeven wrote: > GPIO controllers are exported to userspace using /dev/gpiochip* > character devices. Access control to these devices is provided by > standard UNIX file system permissions, on an all-or-nothing basis: > either a GPIO c

Re: [PATCH v5 3/5] gpio: Add GPIO Aggregator

2020-03-17 Thread Geert Uytterhoeven
. Thanks a lot for your comments! > On Tue, Feb 18, 2020 at 4:18 PM Geert Uytterhoeven > wrote: > > +#define DRV_NAME "gpio-aggregator" > > +#define pr_fmt(fmt)DRV_NAME ": " fmt > > I would just use dev_[info|err] for all messages to

Re: [PATCH v5 2/5] gpiolib: Add support for GPIO line table lookup

2020-03-17 Thread Geert Uytterhoeven
Hi Linus, On Thu, Mar 12, 2020 at 3:21 PM Linus Walleij wrote: > On Tue, Feb 18, 2020 at 4:18 PM Geert Uytterhoeven > wrote: > > Currently GPIOs can only be referred to by GPIO controller and offset in > > GPIO lookup tables. > > > > Add support for looking th

Re: [PATCH v5 1/5] gpiolib: Add support for gpiochipN-based table lookup

2020-03-17 Thread Geert Uytterhoeven
Hi Linus, On Thu, Mar 12, 2020 at 3:23 PM Linus Walleij wrote: > On Tue, Feb 18, 2020 at 4:18 PM Geert Uytterhoeven > wrote: > > > Currently GPIO controllers can only be referred to by label in GPIO > > lookup tables. > > > > Add support for looking them up

Re: [PATCH v5 0/5] gpio: Add GPIO Aggregator

2020-02-21 Thread Geert Uytterhoeven
Hi Linus and Bartosz, On Tue, Feb 18, 2020 at 4:18 PM Geert Uytterhoeven wrote: > GPIO controllers are exported to userspace using /dev/gpiochip* > character devices. Access control to these devices is provided by > standard UNIX file system permissions, on an all-or-nothing basis: &

Re: [PATCH v5 4/5] docs: gpio: Add GPIO Aggregator documentation

2020-02-21 Thread Geert Uytterhoeven
Hi Randy, On Tue, Feb 18, 2020 at 7:30 PM Randy Dunlap wrote: > On 2/18/20 7:18 AM, Geert Uytterhoeven wrote: > > Document the GPIO Aggregator, and the two typical use-cases. > > > > Signed-off-by: Geert Uytterhoeven > > --- /dev/null > > +++ b/Do

Re: [PATCH v5 2/5] gpiolib: Add support for GPIO line table lookup

2020-02-19 Thread Geert Uytterhoeven
On Tue, Feb 18, 2020 at 4:18 PM Geert Uytterhoeven wrote: > Currently GPIOs can only be referred to by GPIO controller and offset in > GPIO lookup tables. > > Add support for looking them up by line name. > Rename gpiod_lookup.chip_label to gpiod_lookup.key, to make it clear > t

Re: [PATCH v5 4/5] docs: gpio: Add GPIO Aggregator documentation

2020-02-18 Thread Geert Uytterhoeven
Hi Randy, On Tue, Feb 18, 2020 at 7:30 PM Randy Dunlap wrote: > On 2/18/20 7:18 AM, Geert Uytterhoeven wrote: > > Document the GPIO Aggregator, and the two typical use-cases. > > > > Signed-off-by: Geert Uytterhoeven > > --- /dev/null > > +++ b/Do

[PATCH v5 0/5] gpio: Add GPIO Aggregator

2020-02-18 Thread Geert Uytterhoeven
t; (https://lore.kernel.org/r/20181003152521.23144-1-geert+rene...@glider.be/) [7] "Getting To Blinky: Virt Edition / Making device pass-through work on embedded ARM" (https://fosdem.org/2019/schedule/event/vai_getting_to_blinky/) Geert Uytterhoeven (5): gpiolib: Ad

[PATCH v5 4/5] docs: gpio: Add GPIO Aggregator documentation

2020-02-18 Thread Geert Uytterhoeven
Document the GPIO Aggregator, and the two typical use-cases. Signed-off-by: Geert Uytterhoeven Reviewed-by: Ulrich Hecht Reviewed-by: Eugeniu Rosca Tested-by: Eugeniu Rosca --- v5: - Add Reviewed-by, Tested-by, - Fix inconsistent indentation. v4: - Add Reviewed-by, - Drop

[PATCH v5 3/5] gpio: Add GPIO Aggregator

2020-02-18 Thread Geert Uytterhoeven
or virtual machine. - Generic GPIO Driver This is useful for industrial control, where it can provide userspace access to a simple GPIO-operated device described in DT, cfr. e.g. spidev for SPI-operated devices. Signed-off-by: Geert Uytterhoeven Reviewed-by: Eugeniu Rosca Tested-by

[PATCH v5 5/5] MAINTAINERS: Add GPIO Aggregator section

2020-02-18 Thread Geert Uytterhoeven
Add a maintainership section for the GPIO Aggregator, covering documentation and driver source code. Signed-off-by: Geert Uytterhoeven Reviewed-by: Eugeniu Rosca Tested-by: Eugeniu Rosca --- v5: - Add Reviewed-by, Tested-by, v4: - Drop controversial GPIO repeater, v3: - New

[PATCH v5 1/5] gpiolib: Add support for gpiochipN-based table lookup

2020-02-18 Thread Geert Uytterhoeven
Currently GPIO controllers can only be referred to by label in GPIO lookup tables. Add support for looking them up by "gpiochipN" name, with "N" the corresponding GPIO device's ID number. Signed-off-by: Geert Uytterhoeven Reviewed-by: Ulrich Hecht Reviewed-by: Eugeniu

[PATCH v5 2/5] gpiolib: Add support for GPIO line table lookup

2020-02-18 Thread Geert Uytterhoeven
. Signed-off-by: Geert Uytterhoeven Reviewed-by: Ulrich Hecht Reviewed-by: Eugeniu Rosca Tested-by: Eugeniu Rosca --- v5: - Add Reviewed-by, Tested-by, v4: - Add Reviewed-by, - Rename gpiod_lookup.chip_label. - Use U16_MAX instead of (u16)-1, v3: - New. --- drivers/gpio/gpiolib.c

Re: [PATCH v3 0/7] gpio: Add GPIO Aggregator/Repeater

2020-01-20 Thread Geert Uytterhoeven
Hi Eugeniu, On Sat, Jan 18, 2020 at 2:46 AM Eugeniu Rosca wrote: > On Wed, Nov 27, 2019 at 09:42:46AM +0100, Geert Uytterhoeven wrote: > > - Create aggregators: > > > > $ echo e6052000.gpio 19,20 \ > > > /sys/bus/platform/drivers/gpio-aggregator/new

[PATCH v4 2/5] gpiolib: Add support for GPIO line table lookup

2020-01-15 Thread Geert Uytterhoeven
. Signed-off-by: Geert Uytterhoeven Reviewed-by: Ulrich Hecht --- v4: - Add Reviewed-by, - Rename gpiod_lookup.chip_label. - Use U16_MAX instead of (u16)-1, v3: - New. --- drivers/gpio/gpiolib.c | 22 +- include/linux/gpio/machine.h | 15 --- 2

[PATCH v4 1/5] gpiolib: Add support for gpiochipN-based table lookup

2020-01-15 Thread Geert Uytterhoeven
Currently GPIO controllers can only be referred to by label in GPIO lookup tables. Add support for looking them up by "gpiochipN" name, with "N" the corresponding GPIO device's ID number. Signed-off-by: Geert Uytterhoeven Reviewed-by: Ulrich Hecht --- v4: - Add Revi

[PATCH v4 4/5] docs: gpio: Add GPIO Aggregator documentation

2020-01-15 Thread Geert Uytterhoeven
Document the GPIO Aggregator, and the two typical use-cases. Signed-off-by: Geert Uytterhoeven Reviewed-by: Ulrich Hecht --- v4: - Add Reviewed-by, - Drop controversial GPIO repeater, - Clarify industrial control use case, - Fix typo s/communicated/communicate/, - Replace abstract

[PATCH v4 0/5] gpio: Add GPIO Aggregator

2020-01-15 Thread Geert Uytterhoeven
rene...@glider.be/) [5] "[PATCH QEMU POC] Add a GPIO backend" (https://lore.kernel.org/linux-renesas-soc/20181003152521.23144-1-geert+rene...@glider.be/) [6] "Getting To Blinky: Virt Edition / Making device pass-through work on embedded ARM" (https://

[PATCH v4 3/5] gpio: Add GPIO Aggregator

2020-01-15 Thread Geert Uytterhoeven
or virtual machine. - Generic GPIO Driver This is useful for industrial control, where it can provide userspace access to a simple GPIO-operated device described in DT, cfr. e.g. spidev for SPI-operated devices. Signed-off-by: Geert Uytterhoeven --- v4: - Remove unused assignment

[PATCH v4 5/5] MAINTAINERS: Add GPIO Aggregator section

2020-01-15 Thread Geert Uytterhoeven
Add a maintainership section for the GPIO Aggregator, covering documentation and driver source code. Signed-off-by: Geert Uytterhoeven --- v4: - Drop controversial GPIO repeater, v3: - New. --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS

Re: [PATCH v3 5/7] gpio: Add GPIO Aggregator/Repeater driver

2020-01-09 Thread Geert Uytterhoeven
Hi Eugeniu, On Tue, Dec 3, 2019 at 11:51 AM Eugeniu Rosca wrote: > On Wed, Nov 27, 2019 at 09:42:51AM +0100, Geert Uytterhoeven wrote: > > +static int gpio_aggregator_probe(struct platform_device *pdev) > > +{ > > + struct device *dev = &pdev->dev; > &

Re: [PATCH v3 5/7] gpio: Add GPIO Aggregator/Repeater driver

2020-01-06 Thread Geert Uytterhoeven
Hi Linus, On Sat, Jan 4, 2020 at 1:38 AM Linus Walleij wrote: > Sorry for slowness... christmas. Np. Happy New Year! > On Thu, Dec 12, 2019 at 4:24 PM Geert Uytterhoeven > wrote: > > On Thu, Dec 12, 2019 at 3:34 PM Linus Walleij > > wrote: > > > > +

Re: [PATCH v3 4/7] dt-bindings: gpio: Add gpio-repeater bindings

2020-01-06 Thread Geert Uytterhoeven
Hi Rob, On Fri, Dec 6, 2019 at 4:04 PM Rob Herring wrote: > On Fri, Dec 6, 2019 at 3:17 AM Geert Uytterhoeven > wrote: > > On Thu, Dec 5, 2019 at 10:06 PM Rob Herring wrote: > > > On Wed, Nov 27, 2019 at 09:42:50AM +0100, Geert Uytterhoeven wrote: > > > > Ad

Re: [PATCH v3 6/7] docs: gpio: Add GPIO Aggregator/Repeater documentation

2020-01-06 Thread Geert Uytterhoeven
Hi Linus, On Sat, Jan 4, 2020 at 1:21 AM Linus Walleij wrote: > On Thu, Dec 12, 2019 at 3:48 PM Geert Uytterhoeven > wrote: > > On Thu, Dec 12, 2019 at 3:42 PM Linus Walleij > > wrote: > > > On Wed, Nov 27, 2019 at 9:43 AM Geert Uytterhoeven > > > wrote:

Re: [PATCH v3 5/7] gpio: Add GPIO Aggregator/Repeater driver

2019-12-12 Thread Geert Uytterhoeven
Hi Linus, On Thu, Dec 12, 2019 at 3:34 PM Linus Walleij wrote: > On Wed, Nov 27, 2019 at 9:43 AM Geert Uytterhoeven > wrote: > > GPIO controllers are exported to userspace using /dev/gpiochip* > > character devices. Access control to these devices is provided by > > s

Re: [PATCH v3 6/7] docs: gpio: Add GPIO Aggregator/Repeater documentation

2019-12-12 Thread Geert Uytterhoeven
Hi Linus, On Thu, Dec 12, 2019 at 3:42 PM Linus Walleij wrote: > On Wed, Nov 27, 2019 at 9:43 AM Geert Uytterhoeven > wrote: > > +The GPIO Aggregator allows access control for individual GPIOs, by > > aggregating > > +them into a new gpio_chip, which can be assigned

Re: [PATCH v3 2/7] gpiolib: Add support for gpiochipN-based table lookup

2019-12-12 Thread Geert Uytterhoeven
Hi Linus, On Thu, Dec 12, 2019 at 2:20 PM Linus Walleij wrote: > On Wed, Nov 27, 2019 at 9:43 AM Geert Uytterhoeven > wrote: > > Currently GPIO controllers can only be referred to by label in GPIO > > lookup tables. > > > > Add support for looking them up by &qu

Re: [PATCH v3 4/7] dt-bindings: gpio: Add gpio-repeater bindings

2019-12-06 Thread Geert Uytterhoeven
Hi Rob, On Thu, Dec 5, 2019 at 10:06 PM Rob Herring wrote: > On Wed, Nov 27, 2019 at 09:42:50AM +0100, Geert Uytterhoeven wrote: > > Add Device Tree bindings for a GPIO repeater, with optional translation > > of physical signal properties. This is useful for describing exp

Re: [PATCH v3 5/7] gpio: Add GPIO Aggregator/Repeater driver

2019-12-03 Thread Geert Uytterhoeven
n -EPROBE_DEFER; So gpiod_get_index() nevers return -EPROBE_DEFER, but returns -ENOENT instead? How can a driver distinguish between "GPIO not found" and "gpiochip driver not yet initialized"? Worse, so the *_optional() variants will return NULL in both cases, too, so

Re: [PATCH v3 5/7] gpio: Add GPIO Aggregator/Repeater driver

2019-11-27 Thread Geert Uytterhoeven
Hi Eugeniu, On Wed, Nov 27, 2019 at 3:15 PM Eugeniu Rosca wrote: > On Wed, Nov 27, 2019 at 09:42:51AM +0100, Geert Uytterhoeven wrote: > > +static bool isrange(const char *s) > > +{ > > + size_t n = strlen(s); > > Cppcheck 1.40-18521-ge6d692d96058: > driver

[PATCH v3 5/7] gpio: Add GPIO Aggregator/Repeater driver

2019-11-27 Thread Geert Uytterhoeven
e "driver_override" in sysfs +*/ + {}, +}; +MODULE_DEVICE_TABLE(of, gpio_aggregator_dt_ids); +#endif + +static struct platform_driver gpio_aggregator_driver = { + .probe = gpio_aggregator_probe, + .driver = { + .name = DRV_NAME, + .groups = gpio_aggregator_groups, + .of_match_table = of_match_ptr(gpio_aggregator_dt_ids), + }, +}; + +static int __init gpio_aggregator_init(void) +{ + return platform_driver_register(&gpio_aggregator_driver); +} +module_init(gpio_aggregator_init); + +static void __exit gpio_aggregator_exit(void) +{ + gpio_aggregator_remove_all(); + platform_driver_unregister(&gpio_aggregator_driver); +} +module_exit(gpio_aggregator_exit); + +MODULE_AUTHOR("Geert Uytterhoeven "); +MODULE_DESCRIPTION("GPIO Aggregator/Repeater"); +MODULE_LICENSE("GPL v2"); -- 2.17.1

[PATCH v3 6/7] docs: gpio: Add GPIO Aggregator/Repeater documentation

2019-11-27 Thread Geert Uytterhoeven
Document the GPIO Aggregator/Repeater, and the three typical use-cases. Signed-off-by: Geert Uytterhoeven --- v3: - New. --- .../admin-guide/gpio/gpio-aggregator.rst | 111 ++ Documentation/admin-guide/gpio/index.rst | 1 + 2 files changed, 112 insertions

[PATCH v3 0/7] gpio: Add GPIO Aggregator/Repeater

2019-11-27 Thread Geert Uytterhoeven
renesas-soc/20181003152521.23144-1-geert+rene...@glider.be/) [5] "Getting To Blinky: Virt Edition / Making device pass-through work on embedded ARM" (https://fosdem.org/2019/schedule/event/vai_getting_to_blinky/) Geert Uytterhoeven (7): gpiolib: Add GPIOCHIP_NAME definiti

[PATCH v3 4/7] dt-bindings: gpio: Add gpio-repeater bindings

2019-11-27 Thread Geert Uytterhoeven
ore.kernel.org/linux-renesas-soc/20190607172958.20745-1-ero...@de.adit-jv.com/ Signed-off-by: Geert Uytterhoeven --- v3: - New. --- .../bindings/gpio/gpio-repeater.yaml | 53 +++ 1 file changed, 53 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpi

[PATCH v3 1/7] gpiolib: Add GPIOCHIP_NAME definition

2019-11-27 Thread Geert Uytterhoeven
The string literal "gpiochip" is used in several places. Add a definition for it, and use it everywhere, to make sure everything stays in sync. Signed-off-by: Geert Uytterhoeven --- v3: - New. --- drivers/gpio/gpiolib-sysfs.c | 7 +++ drivers/gpio/gpiolib.c | 4 ++-- dr

[PATCH v3 2/7] gpiolib: Add support for gpiochipN-based table lookup

2019-11-27 Thread Geert Uytterhoeven
Currently GPIO controllers can only be referred to by label in GPIO lookup tables. Add support for looking them up by "gpiochipN" name, with "N" either the corresponding GPIO device's ID number, or the GPIO controller's first GPIO number. Signed-off-by: Geer

[PATCH v3 3/7] gpiolib: Add support for GPIO line table lookup

2019-11-27 Thread Geert Uytterhoeven
Currently GPIOs can only be referred to by GPIO controller and offset in GPIO lookup tables. Add support for looking them up by line name. Signed-off-by: Geert Uytterhoeven --- If this is rejected, the GPIO Aggregator documentation and code must be updated. v3: - New. --- drivers/gpio

[PATCH v3 7/7] MAINTAINERS: Add GPIO Aggregator/Repeater section

2019-11-27 Thread Geert Uytterhoeven
Add a maintainership section for the GPIO Aggregator/Repeater, covering documentation, Device Tree bindings, and driver source code. Signed-off-by: Geert Uytterhoeven --- Harish: Do you want to be listed as maintainer, too? v3: - New. --- MAINTAINERS | 8 1 file changed, 8

Re: [Qemu-devel] [PATCH RFC] gpio: Add Virtual Aggregator GPIO Driver

2019-09-12 Thread Geert Uytterhoeven
Hi Linus, On Thu, Sep 12, 2019 at 10:56 AM Linus Walleij wrote: > On Fri, Jul 5, 2019 at 5:05 PM Geert Uytterhoeven > wrote: > > GPIO controllers are exported to userspace using /dev/gpiochip* > > character devices. Access control to these devices is provided by > > s

[Qemu-devel] [PATCH/RFC v2 4/5] gpio: Add GPIO Forwarder Helper

2019-09-11 Thread Geert Uytterhoeven
Add a helper for creating GPIO chips that merely forward all operations to other GPIOs. This will be used by the GPIO Aggregator. Signed-off-by: Geert Uytterhoeven --- I expect this can be used by the GPIO inverter, too, after adding an "invert" flag, or a filter function that ch

[Qemu-devel] [PATCH/RFC v2 0/5] gpio: Add GPIO Aggregator Driver

2019-09-11 Thread Geert Uytterhoeven
rt+rene...@glider.be/) - [3] "Getting To Blinky: Virt Edition / Making device pass-through work on embedded ARM" (https://fosdem.org/2019/schedule/event/vai_getting_to_blinky/) Geert Uytterhoeven (5): gpio: Export gpiod_{request,free}() to modular GPIO code gpio: Export

[Qemu-devel] [PATCH/RFC v2 1/5] gpio: Export gpiod_{request, free}() to modular GPIO code

2019-09-11 Thread Geert Uytterhoeven
Export the gpiod_request() and gpiod_free() symbols, so modular GPIO library code can make use of these functions. Signed-off-by: Geert Uytterhoeven --- ERROR: "gpiod_free" [drivers/gpio/gpiolib-fwd.ko] undefined! ERROR: "gpiod_request" [drivers/gpio/gpiolib-fwd.ko] unde

[Qemu-devel] [PATCH/RFC v2 3/5] gpio: Export gpio_name_to_desc() to modular GPIO code

2019-09-11 Thread Geert Uytterhoeven
Make gpio_name_to_desc() global, and export its symbol, so modular GPIO driver can make use of this function. This will be used by the GPIO Aggregator. Signed-off-by: Geert Uytterhoeven --- drivers/gpio/gpiolib.c | 3 ++- drivers/gpio/gpiolib.h | 1 + 2 files changed, 3 insertions(+), 1

[Qemu-devel] [PATCH/RFC v2 5/5] gpio: Add GPIO Aggregator Driver

2019-09-11 Thread Geert Uytterhoeven
> /sys/bus/platform/drivers/gpio-aggregator/delete_device Signed-off-by: Geert Uytterhoeven --- v2: - Add missing initialization of i in gpio_virt_agg_probe(), - Update for removed .need_valid_mask field and changed .init_valid_mask() signature, - Drop "virtual", rename to

[Qemu-devel] [PATCH/RFC v2 2/5] gpio: Export gpiochip_get_desc() to modular GPIO code

2019-09-11 Thread Geert Uytterhoeven
Export the gpiochip_get_desc() symbol, so modular GPIO driver can make use of this function again. This is a partial revert of commit 1bd6b601fe196b6f ("gpio: make gpiochip_get_desc() gpiolib-private"). Signed-off-by: Geert Uytterhoeven --- ERROR: "gpiochip_get_desc"

Re: [Qemu-devel] [PATCH RFC] gpio: Add Virtual Aggregator GPIO Driver

2019-09-06 Thread Geert Uytterhoeven
Hi Bartosz, On Fri, Jul 12, 2019 at 11:27 AM Bartosz Golaszewski wrote: > wt., 9 lip 2019 o 17:59 Geert Uytterhoeven napisał(a): > > On Tue, Jul 9, 2019 at 4:59 PM Bartosz Golaszewski > > wrote: > > > pon., 8 lip 2019 o 12:24 Geert Uytterhoeven > > > napisa

Re: [Qemu-devel] [PATCH RFC] gpio: Add Virtual Aggregator GPIO Driver

2019-09-06 Thread Geert Uytterhoeven
On Tue, Jul 9, 2019 at 4:59 PM Bartosz Golaszewski wrote: > pon., 8 lip 2019 o 12:24 Geert Uytterhoeven napisał(a): > > On Mon, Jul 8, 2019 at 11:45 AM Bartosz Golaszewski > > wrote: > > > pt., 5 lip 2019 o 18:05 Geert Uytterhoeven > > >

Re: [Qemu-devel] [PATCH RFC] gpio: Add Virtual Aggregator GPIO Driver

2019-07-11 Thread Geert Uytterhoeven
Hi Phil, On Thu, Jul 11, 2019 at 11:24 AM Phil Reid wrote: > On 10/07/2019 18:21, Geert Uytterhoeven wrote: > > On Wed, Jul 10, 2019 at 4:00 AM Phil Reid wrote: > >> On 6/07/2019 00:05, Geert Uytterhoeven wrote: > >>> GPIO controllers are exported to

Re: [Qemu-devel] [PATCH RFC] gpio: Add Virtual Aggregator GPIO Driver

2019-07-10 Thread Geert Uytterhoeven
Hi Phil, On Wed, Jul 10, 2019 at 4:00 AM Phil Reid wrote: > On 6/07/2019 00:05, Geert Uytterhoeven wrote: > > GPIO controllers are exported to userspace using /dev/gpiochip* > > character devices. Access control to these devices is provided by > > standard UNIX file syst

Re: [Qemu-devel] [PATCH RFC] gpio: Add Virtual Aggregator GPIO Driver

2019-07-09 Thread Geert Uytterhoeven
Hi Bartosz, On Tue, Jul 9, 2019 at 4:59 PM Bartosz Golaszewski wrote: > pon., 8 lip 2019 o 12:24 Geert Uytterhoeven napisał(a): > > On Mon, Jul 8, 2019 at 11:45 AM Bartosz Golaszewski > > wrote: > > > pt., 5 lip 2019 o 18:05 Geert Uytterhoeven > > > napisał

Re: [Qemu-devel] [PATCH RFC] gpio: Add Virtual Aggregator GPIO Driver

2019-07-08 Thread Geert Uytterhoeven
Hi Bartosz, On Mon, Jul 8, 2019 at 11:45 AM Bartosz Golaszewski wrote: > pt., 5 lip 2019 o 18:05 Geert Uytterhoeven > napisał(a): > > GPIO controllers are exported to userspace using /dev/gpiochip* > > character devices. Access control to these devices is provided by >

[Qemu-devel] [PATCH RFC] gpio: Add Virtual Aggregator GPIO Driver

2019-07-05 Thread Geert Uytterhoeven
$ echo " [ ...]" "[, [ ...]] ...]" > /sys/bus/platform/drivers/gpio-virt-agg/new_device Likewise, virtual GPIO controllers can be destroyed after use: $ echo gpio-virt-agg. \ > /sys/bus/platform/drivers/gpio-virt-agg/delete_devic

Re: [Qemu-devel] [PATCH QEMU v5] hw/arm/sysbus-fdt: Add support for instantiating generic devices

2019-01-09 Thread Geert Uytterhoeven
Hi Peter, Thanks for your comments! On Wed, Jan 9, 2019 at 5:03 PM Peter Maydell wrote: > On Wed, 9 Jan 2019 at 15:55, Auger Eric wrote: > > On 1/3/19 10:42 AM, Geert Uytterhoeven wrote: > > > Add a fallback for instantiating generic devices without a type-specific > >

Re: [Qemu-devel] [PATCH QEMU v5] hw/arm/sysbus-fdt: Add support for instantiating generic devices

2019-01-09 Thread Geert Uytterhoeven
Hi Eric, Thanks for your comments! On Wed, Jan 9, 2019 at 4:56 PM Auger Eric wrote: > On 1/3/19 10:42 AM, Geert Uytterhoeven wrote: > > Add a fallback for instantiating generic devices without a type-specific > > or compatible-specific instantiation method. This will be used wh

[Qemu-devel] [PATCH QEMU v5] hw/arm/sysbus-fdt: Add support for instantiating generic devices

2019-01-03 Thread Geert Uytterhoeven
ce vfio-platform,host=ee300000.sata Signed-off-by: Geert Uytterhoeven --- Note: Also tested with GPIO, which needs "vfio: No-IOMMU mode support": -device vfio-platform,host=e6055400.gpio v5: - Replace copying of a fixed list of properties (and ignoring all others), by scanning

Re: [Qemu-devel] [PATCH v2 for-3.1] hw/arm/sysbus-fdt: Only call match_fn callback if the type matches

2018-11-07 Thread Geert Uytterhoeven
ode duplication > - mention the ramfb regression fixed by this patch in the > commit message. Thanks for looking into this! After applying "hw/arm/sysbus-fdt: Add support for instantiating generic devices", "-device vfio-platform,host=ee30.sata" still works fine.

[Qemu-devel] [PATCH QEMU POC] Add a GPIO backend

2018-10-03 Thread Geert Uytterhoeven
igned-off-by: Geert Uytterhoeven --- Thanks for your comments! --- backends/Makefile.objs | 2 + backends/gpiodev.c | 183 +++ configure| 29 +++ hw/arm/virt.c| 6 ++ include/sysemu/gpiodev.h | 11 +++ qemu-o

Re: [Qemu-devel] [PATCH qemu v2] hw/char/sh_serial: Add timeout handling to unbreak serial input

2018-09-28 Thread Geert Uytterhoeven
Hi Paolo, On Tue, Sep 11, 2018 at 3:11 PM Paolo Bonzini wrote: > On 05/09/2018 15:11, Geert Uytterhoeven wrote: > > As of commit 18e8cf159177100e ("serial: sh-sci: increase RX FIFO trigger > > defaults for (H)SCIF") in Linux v4.11-rc1, the serial console on the > >

[Qemu-devel] [PATCH qemu v5 0/3] vfio/sysbus-fdt: Prepare for Generic DT Pass-Through

2018-09-27 Thread Geert Uytterhoeven
form,host=ee30.sata and GPIO (needs VFIO No-IOMMU support): -device vfio-platform,host=e6055400.gpio Thanks for applying! Auger Eric (2): vfio/platform: Make the vfio-platform device non-abstract hw/arm/sysbus-fdt: Allow device matching with DT compatible value Geert Uyt

  1   2   >