Re: [PATCH] gpio: Use separate bitfield array to indicate GPIO is claimed

2023-07-28 Thread Marek Vasut
On 7/28/23 03:52, Simon Glass wrote: [...] @@ -1341,6 +1358,13 @@ static int gpio_post_probe(struct udevice *dev) if (!uc_priv->name) return -ENOMEM; + uc_priv->claimed = calloc(DIV_ROUND_UP(uc_priv->gpio_count, 32), + sizeof(*uc_

Re: [PATCH] gpio: Use separate bitfield array to indicate GPIO is claimed

2023-07-27 Thread Simon Glass
Hi Marek, On Thu, 27 Jul 2023 at 09:50, Marek Vasut wrote: > > The current gpio-uclass design uses name field in struct gpio_dev_priv as > an indicator that GPIO is claimed by consumer. This overloads the function > of name field and does not work well for named pins not configured as GPIO > pins

[PATCH] gpio: Use separate bitfield array to indicate GPIO is claimed

2023-07-27 Thread Marek Vasut
The current gpio-uclass design uses name field in struct gpio_dev_priv as an indicator that GPIO is claimed by consumer. This overloads the function of name field and does not work well for named pins not configured as GPIO pins. Introduce separate bitfield array as the claim indicator. This unbr