[PATCH v2 07/15] gpio: brcmstb: use new generic GPIO chip API
Doug Berger
opendmb at gmail.com
Thu Sep 11 12:50:47 PDT 2025
On 9/11/2025 12:56 AM, Bartosz Golaszewski wrote:
> On Thu, Sep 11, 2025 at 2:11 AM Doug Berger <opendmb at gmail.com> wrote:
>>
>>>
>>> @@ -700,7 +707,8 @@ static int brcmstb_gpio_probe(struct platform_device *pdev)
>>> * be retained from S5 cold boot
>>> */
>>> need_wakeup_event |= !!__brcmstb_gpio_get_active_irqs(bank);
>>> - gc->write_reg(reg_base + GIO_MASK(bank->id), 0);
>>> + gpio_generic_write_reg(&bank->chip,
>>> + reg_base + GIO_MASK(bank->id), 0);
>>>
>>> err = gpiochip_add_data(gc, bank);
>>> if (err) {
>>>
>> I suppose I'm OK with all of this, but I'm just curious about the longer
>> term plans for the member accesses. Is there an intent to have helpers
>> for things like?:
>> chip.gc.offset
>> chip.gc.ngpio
>
> I don't think so. It would require an enormous effort and these fields
> in struct gpio_chip are pretty stable so there's no real reason for
> it.
>
> Bart
Ok, so assuming struct gpio_chip is sticking around long term that makes
sense to me.
Thanks!
Acked-by: Doug Berger <opendmb at gmail.com>
More information about the linux-riscv
mailing list