Re: [PATCH] [v2] at86rf230: convert to gpio descriptors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 31, 2023 at 3:52 PM Dmitry Torokhov
<dmitry.torokhov@xxxxxxxxx> wrote:
>
> Hi Arnd,
>
> On Thu, Jan 26, 2023 at 8:32 AM Arnd Bergmann <arnd@xxxxxxxxxx> wrote:
> >
> >         /* Reset */
> > -       if (gpio_is_valid(rstn)) {
> > +       if (rstn) {
> >                 udelay(1);
> > -               gpio_set_value_cansleep(rstn, 0);
> > +               gpiod_set_value_cansleep(rstn, 0);
> >                 udelay(1);
> > -               gpio_set_value_cansleep(rstn, 1);
> > +               gpiod_set_value_cansleep(rstn, 1);
>
> For gpiod conversions, if we are not willing to chase whether existing
> DTSes specify polarities
> properly and create workarounds in case they are wrong, we should use
> gpiod_set_raw_value*()
> (my preference would be to do the work and not use "raw" variants).
>
> In this particular case, arch/arm/boot/dts/vf610-zii-dev-rev-c.dts
> defines reset line as active low,
> so you are leaving the device in reset state.
>
> Please review your other conversion patches.

We also can not change the names of requested GPIOs from "reset-gpio"
to "rstn-gpios" and expect
this to work.

Stefan, please consider reverting this and applying a couple of
patches I will send out shortly.

Thanks.

-- 
Dmitry



[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux