Message ID | 20201116104242.19907-1-brgl@bgdev.pl |
---|---|
Headers | show |
Series | gpio: exar: refactor the driver | expand |
On Mon, Nov 16, 2020 at 11:42 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote: > > From: Bartosz Golaszewski <bgolaszewski@baylibre.com> > > I just wanted to convert the driver to using simpler IDA API but ended up > quickly converting it to using regmap. Unfortunately I don't have the HW > to test it so marking the patches that introduce functional change as RFT > and Cc'ing the original author. > Hi Jan! Could you give this last version a final spin before I merge it? Bartosz
On 23.11.20 12:38, Bartosz Golaszewski wrote: > On Mon, Nov 16, 2020 at 11:42 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote: >> >> From: Bartosz Golaszewski <bgolaszewski@baylibre.com> >> >> I just wanted to convert the driver to using simpler IDA API but ended up >> quickly converting it to using regmap. Unfortunately I don't have the HW >> to test it so marking the patches that introduce functional change as RFT >> and Cc'ing the original author. >> > > Hi Jan! > > Could you give this last version a final spin before I merge it? > [ 14.250117] exar_serial 0000:02:00.0: enabling device (0000 -> 0002) [ 14.336622] 0000:02:00.0: ttyS2 at MMIO 0x90000000 (irq = 44, base_baud = 7812500) is a XR17V35X [ 14.391588] 0000:02:00.0: ttyS3 at MMIO 0x90000400 (irq = 44, base_baud = 7812500) is a XR17V35X [ 19.250510] gpio_exar: probe of gpio_exar.1.auto failed with error -22 That's "new"... Jan -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux
On 23.11.20 12:58, Jan Kiszka wrote: > On 23.11.20 12:38, Bartosz Golaszewski wrote: >> On Mon, Nov 16, 2020 at 11:42 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote: >>> >>> From: Bartosz Golaszewski <bgolaszewski@baylibre.com> >>> >>> I just wanted to convert the driver to using simpler IDA API but ended up >>> quickly converting it to using regmap. Unfortunately I don't have the HW >>> to test it so marking the patches that introduce functional change as RFT >>> and Cc'ing the original author. >>> >> >> Hi Jan! >> >> Could you give this last version a final spin before I merge it? >> > > [ 14.250117] exar_serial 0000:02:00.0: enabling device (0000 -> 0002) > [ 14.336622] 0000:02:00.0: ttyS2 at MMIO 0x90000000 (irq = 44, base_baud = 7812500) is a XR17V35X > [ 14.391588] 0000:02:00.0: ttyS3 at MMIO 0x90000400 (irq = 44, base_baud = 7812500) is a XR17V35X > [ 19.250510] gpio_exar: probe of gpio_exar.1.auto failed with error -22 > > That's "new"... > Bisected to "gpio: exar: switch to using regmap" again. Jan -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux
Thanks!On Mon, Nov 23, 2020 at 1:03 PM Jan Kiszka <jan.kiszka@siemens.com> wrote: > > On 23.11.20 12:38, Bartosz Golaszewski wrote: > > On Mon, Nov 16, 2020 at 11:42 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote: > >> > >> From: Bartosz Golaszewski <bgolaszewski@baylibre.com> > >> > >> I just wanted to convert the driver to using simpler IDA API but ended up > >> quickly converting it to using regmap. Unfortunately I don't have the HW > >> to test it so marking the patches that introduce functional change as RFT > >> and Cc'ing the original author. > >> > > > > Hi Jan! > > > > Could you give this last version a final spin before I merge it? > > > > [ 14.250117] exar_serial 0000:02:00.0: enabling device (0000 -> 0002) > [ 14.336622] 0000:02:00.0: ttyS2 at MMIO 0x90000000 (irq = 44, base_baud = 7812500) is a XR17V35X > [ 14.391588] 0000:02:00.0: ttyS3 at MMIO 0x90000400 (irq = 44, base_baud = 7812500) is a XR17V35X > [ 19.250510] gpio_exar: probe of gpio_exar.1.auto failed with error -22 > > That's "new"... > And if you change reg_bits from 11 to 16? Bartosz
On Mon, Nov 23, 2020 at 1:12 PM Jan Kiszka <jan.kiszka@siemens.com> wrote: > > On 23.11.20 12:58, Jan Kiszka wrote: > > On 23.11.20 12:38, Bartosz Golaszewski wrote: > >> On Mon, Nov 16, 2020 at 11:42 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote: > >>> > >>> From: Bartosz Golaszewski <bgolaszewski@baylibre.com> > >>> > >>> I just wanted to convert the driver to using simpler IDA API but ended up > >>> quickly converting it to using regmap. Unfortunately I don't have the HW > >>> to test it so marking the patches that introduce functional change as RFT > >>> and Cc'ing the original author. > >>> > >> > >> Hi Jan! > >> > >> Could you give this last version a final spin before I merge it? > >> > > > > [ 14.250117] exar_serial 0000:02:00.0: enabling device (0000 -> 0002) > > [ 14.336622] 0000:02:00.0: ttyS2 at MMIO 0x90000000 (irq = 44, base_baud = 7812500) is a XR17V35X > > [ 14.391588] 0000:02:00.0: ttyS3 at MMIO 0x90000400 (irq = 44, base_baud = 7812500) is a XR17V35X > > [ 19.250510] gpio_exar: probe of gpio_exar.1.auto failed with error -22 > > > > That's "new"... > > > > Bisected to "gpio: exar: switch to using regmap" again. > I'm not sure if you saw my email which I sent at the same time as you - but does reverting reg_bits to 16 help? Bart
On 23.11.20 13:12, Bartosz Golaszewski wrote: > Thanks!On Mon, Nov 23, 2020 at 1:03 PM Jan Kiszka > <jan.kiszka@siemens.com> wrote: >> >> On 23.11.20 12:38, Bartosz Golaszewski wrote: >>> On Mon, Nov 16, 2020 at 11:42 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote: >>>> >>>> From: Bartosz Golaszewski <bgolaszewski@baylibre.com> >>>> >>>> I just wanted to convert the driver to using simpler IDA API but ended up >>>> quickly converting it to using regmap. Unfortunately I don't have the HW >>>> to test it so marking the patches that introduce functional change as RFT >>>> and Cc'ing the original author. >>>> >>> >>> Hi Jan! >>> >>> Could you give this last version a final spin before I merge it? >>> >> >> [ 14.250117] exar_serial 0000:02:00.0: enabling device (0000 -> 0002) >> [ 14.336622] 0000:02:00.0: ttyS2 at MMIO 0x90000000 (irq = 44, base_baud = 7812500) is a XR17V35X >> [ 14.391588] 0000:02:00.0: ttyS3 at MMIO 0x90000400 (irq = 44, base_baud = 7812500) is a XR17V35X >> [ 19.250510] gpio_exar: probe of gpio_exar.1.auto failed with error -22 >> >> That's "new"... >> > > And if you change reg_bits from 11 to 16? > 16 works. Didn't we have that already? Jan -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux
On Mon, Nov 23, 2020 at 2:00 PM Jan Kiszka <jan.kiszka@siemens.com> wrote: > > On 23.11.20 13:12, Bartosz Golaszewski wrote: > > Thanks!On Mon, Nov 23, 2020 at 1:03 PM Jan Kiszka > > <jan.kiszka@siemens.com> wrote: > >> > >> On 23.11.20 12:38, Bartosz Golaszewski wrote: > >>> On Mon, Nov 16, 2020 at 11:42 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote: > >>>> > >>>> From: Bartosz Golaszewski <bgolaszewski@baylibre.com> > >>>> > >>>> I just wanted to convert the driver to using simpler IDA API but ended up > >>>> quickly converting it to using regmap. Unfortunately I don't have the HW > >>>> to test it so marking the patches that introduce functional change as RFT > >>>> and Cc'ing the original author. > >>>> > >>> > >>> Hi Jan! > >>> > >>> Could you give this last version a final spin before I merge it? > >>> > >> > >> [ 14.250117] exar_serial 0000:02:00.0: enabling device (0000 -> 0002) > >> [ 14.336622] 0000:02:00.0: ttyS2 at MMIO 0x90000000 (irq = 44, base_baud = 7812500) is a XR17V35X > >> [ 14.391588] 0000:02:00.0: ttyS3 at MMIO 0x90000400 (irq = 44, base_baud = 7812500) is a XR17V35X > >> [ 19.250510] gpio_exar: probe of gpio_exar.1.auto failed with error -22 > >> > >> That's "new"... > >> > > > > And if you change reg_bits from 11 to 16? > > > > 16 works. Didn't we have that already? > > Jan Yes we have, Andy suggested 11 is fine because it fits the highest address we need to access but it seems regmap doesn't like this value. Ok so I'll change it when applying, is that fine with you? Bart
On Mon, Nov 23, 2020 at 01:57:07PM +0100, Jan Kiszka wrote: > On 23.11.20 13:12, Bartosz Golaszewski wrote: > > Thanks!On Mon, Nov 23, 2020 at 1:03 PM Jan Kiszka > > <jan.kiszka@siemens.com> wrote: > >> > >> On 23.11.20 12:38, Bartosz Golaszewski wrote: > >>> On Mon, Nov 16, 2020 at 11:42 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote: > >>>> > >>>> From: Bartosz Golaszewski <bgolaszewski@baylibre.com> > >>>> > >>>> I just wanted to convert the driver to using simpler IDA API but ended up > >>>> quickly converting it to using regmap. Unfortunately I don't have the HW > >>>> to test it so marking the patches that introduce functional change as RFT > >>>> and Cc'ing the original author. > >>>> > >>> > >>> Hi Jan! > >>> > >>> Could you give this last version a final spin before I merge it? > >>> > >> > >> [ 14.250117] exar_serial 0000:02:00.0: enabling device (0000 -> 0002) > >> [ 14.336622] 0000:02:00.0: ttyS2 at MMIO 0x90000000 (irq = 44, base_baud = 7812500) is a XR17V35X > >> [ 14.391588] 0000:02:00.0: ttyS3 at MMIO 0x90000400 (irq = 44, base_baud = 7812500) is a XR17V35X > >> [ 19.250510] gpio_exar: probe of gpio_exar.1.auto failed with error -22 > >> > >> That's "new"... > >> > > > > And if you change reg_bits from 11 to 16? > > > > 16 works. Didn't we have that already? Yes, but it puzzles me what the idea behind it and don't we see the regmap issue here. In any case, I'm fine with 16 there, although it's not clear to me why 11 is not working... -- With Best Regards, Andy Shevchenko
From: Bartosz Golaszewski <bgolaszewski@baylibre.com> I just wanted to convert the driver to using simpler IDA API but ended up quickly converting it to using regmap. Unfortunately I don't have the HW to test it so marking the patches that introduce functional change as RFT and Cc'ing the original author. v1 -> v2: - add new regmap helper: regmap_assign_bits() - fix lvl vs sel register access - set value in direction_output callback v2 -> v3: - drop the regmap helper from series v3 -> v4: - renamed the regmap variable to 'regmap' as leaving the old name caused me to miss an assignment leading to a crash (culprit spotted by Andy Shevchenko) v4 -> v5: - set the reg_bits to 11 in regmap config - collect review tags from Andy Bartosz Golaszewski (7): gpio: exar: add a newline after the copyright notice gpio: exar: include idr.h gpio: exar: switch to a simpler IDA interface gpio: exar: use a helper variable for &pdev->dev gpio: exar: unduplicate address and offset computation gpio: exar: switch to using regmap gpio: exar: use devm action for freeing the IDA and drop remove() drivers/gpio/Kconfig | 1 + drivers/gpio/gpio-exar.c | 160 ++++++++++++++++++++------------------- 2 files changed, 82 insertions(+), 79 deletions(-)