diff for duplicates of <20181021155202.5fe5a49f@archlinux> diff --git a/a/1.txt b/N1/1.txt index d6619b4..3ceb6d2 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -3,30 +3,22 @@ Lars-Peter Clausen <lars@metafoo.de> wrote: > On 10/18/2018 09:28 AM, Phil Reid wrote: > [...] -> >> +=C2=A0=C2=A0=C2=A0 chip->rdwr_pin =3D devm_gpiod_get(&spi_dev->dev, "= -rdwr", GPIOD_IN); -> >> +=C2=A0=C2=A0=C2=A0 if (IS_ERR(chip->rdwr_pin)) { -> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ret =3D PTR_ERR(chip->rdwr= -_pin); -> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 dev_err(&spi_dev->dev, "Fa= -iled to request rdwr GPIO: %d\n", -> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 re= -t); -> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return ret; -> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } -> >> -=C2=A0=C2=A0=C2=A0 gpio_direction_input(chip->rdwr_pin); =20 -> >=20 -> > The RD/WR pin is an input to the AD78xx. So this doesn't make sense bei= -ng -> > GPIOD_IN. =20 ->=20 -> One thing at a time. This patch is a straight forward conversion to the G= -PIO -> descriptor interface. It keeps the existing semantics of the driver as th= -ey are. ->=20 -> Now these semantics are obviously wrong and should be fixed but that shou= -ld +> >> + chip->rdwr_pin = devm_gpiod_get(&spi_dev->dev, "rdwr", GPIOD_IN); +> >> + if (IS_ERR(chip->rdwr_pin)) { +> >> + ret = PTR_ERR(chip->rdwr_pin); +> >> + dev_err(&spi_dev->dev, "Failed to request rdwr GPIO: %d\n", +> >> + ret); +> >> return ret; +> >> } +> >> - gpio_direction_input(chip->rdwr_pin); +> > +> > The RD/WR pin is an input to the AD78xx. So this doesn't make sense being +> > GPIOD_IN. +> +> One thing at a time. This patch is a straight forward conversion to the GPIO +> descriptor interface. It keeps the existing semantics of the driver as they are. +> +> Now these semantics are obviously wrong and should be fixed but that should > be a separate patch from changing the interface. Agreed. Useful to raise these issues however, and I've added a note to the patch to bring this to anyone's attention should they be interesting. diff --git a/a/content_digest b/N1/content_digest index 5b9a7e4..4effae7 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -22,30 +22,22 @@ "\n" "> On 10/18/2018 09:28 AM, Phil Reid wrote:\n" "> [...]\n" - "> >> +=C2=A0=C2=A0=C2=A0 chip->rdwr_pin =3D devm_gpiod_get(&spi_dev->dev, \"=\n" - "rdwr\", GPIOD_IN);\n" - "> >> +=C2=A0=C2=A0=C2=A0 if (IS_ERR(chip->rdwr_pin)) {\n" - "> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ret =3D PTR_ERR(chip->rdwr=\n" - "_pin);\n" - "> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 dev_err(&spi_dev->dev, \"Fa=\n" - "iled to request rdwr GPIO: %d\\n\",\n" - "> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 re=\n" - "t);\n" - "> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return ret;\n" - "> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 }\n" - "> >> -=C2=A0=C2=A0=C2=A0 gpio_direction_input(chip->rdwr_pin); =20\n" - "> >=20\n" - "> > The RD/WR pin is an input to the AD78xx. So this doesn't make sense bei=\n" - "ng\n" - "> > GPIOD_IN. =20\n" - ">=20\n" - "> One thing at a time. This patch is a straight forward conversion to the G=\n" - "PIO\n" - "> descriptor interface. It keeps the existing semantics of the driver as th=\n" - "ey are.\n" - ">=20\n" - "> Now these semantics are obviously wrong and should be fixed but that shou=\n" - "ld\n" + "> >> +\302\240\302\240\302\240 chip->rdwr_pin = devm_gpiod_get(&spi_dev->dev, \"rdwr\", GPIOD_IN);\n" + "> >> +\302\240\302\240\302\240 if (IS_ERR(chip->rdwr_pin)) {\n" + "> >> +\302\240\302\240\302\240\302\240\302\240\302\240\302\240 ret = PTR_ERR(chip->rdwr_pin);\n" + "> >> +\302\240\302\240\302\240\302\240\302\240\302\240\302\240 dev_err(&spi_dev->dev, \"Failed to request rdwr GPIO: %d\\n\",\n" + "> >> +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240 ret);\n" + "> >> \302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240 return ret;\n" + "> >> \302\240\302\240\302\240\302\240\302\240 }\n" + "> >> -\302\240\302\240\302\240 gpio_direction_input(chip->rdwr_pin); \n" + "> > \n" + "> > The RD/WR pin is an input to the AD78xx. So this doesn't make sense being\n" + "> > GPIOD_IN. \n" + "> \n" + "> One thing at a time. This patch is a straight forward conversion to the GPIO\n" + "> descriptor interface. It keeps the existing semantics of the driver as they are.\n" + "> \n" + "> Now these semantics are obviously wrong and should be fixed but that should\n" "> be a separate patch from changing the interface.\n" "Agreed. Useful to raise these issues however, and I've added a note to the\n" "patch to bring this to anyone's attention should they be interesting.\n" @@ -54,4 +46,4 @@ "\n" Jonathan -dcb1d15655fe9fbfe540eea7245a5c4aaa0976d5dbfb4e859aea422e4d6e898e +4d8c61fdc2ab5b639c0a1e3405499c70e366a6f85e99e5d84fc53128ac4a0077
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.