Re: [PATCH libgpiod v5 4/4] dbus: add the D-Bus daemon, command-line client and tests

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

 



Hi Bartosz!

On Mon, 2024-10-28 at 20:13 +0100, Bartosz Golaszewski wrote:
> > Strange, I'd expect from this code to detect pre-existing chips immediately,
> > but this is not what I observe in practice:
> > 
> > $ gpiocli info --chip=gpiochip0 | head -n 1
> > gpiochip0 - 24 lines:
> > $ gpiocli wait --chip=gpiochip0 --timeout=1
> > gpiocli wait: wait timed out!
> > 
> > (without timeout it would wait endlessly)
> > 
> > This is not expected, right, otherwise it would be counter-intuitive and racy?
> > 
> 
> gpiochip0 here is the device name. It's dynamic so you cannot use it
> with gpiocli wait as you cannot know it in advance. You need to use
> the label of the chip instead.
> 
> IOW it's a feature. :)

Thanks for the quick reply!
My bad! Indeed it works as intended with labels!

I think I've found something else, but I didn't have time to look into it deeper:

$ gpiocli info POLA_RS485_2
gpiochip0   2:	"POLA_RS485_2"		[used,consumer="gpio-manager",managed="request14",output,push-pull]
$ gpiocli reconfigure --input --both-edges request14
gpiocli reconfigure: Failed to reconfigure lines: GDBus.Error:io.gpiod1.ReconfigureFailed: failed to reconfigure lines: No such device or address
$ gpiocli reconfigure --input request14
$ gpiocli reconfigure --input --both-edges request14
gpiocli reconfigure: Failed to reconfigure lines: GDBus.Error:io.gpiod1.ReconfigureFailed: failed to reconfigure lines: No such device or address

journal:
gpio-manager[3043]: failed to reconfigure GPIO lines on request '/io/gpiod1/requests/request14': failed to reconfigure lines: No such device or address

$ gpiocli info POLA_RS485_2
gpiochip0   2:	"POLA_RS485_2"		[used,consumer="gpio-manager",managed="request14",input]

For me it happens with all GPIOs I've tried, I can reconfigure output to input,
but not set edge-detection, neither simultaneously, nor after output->input configuration.
However I don't have any problems to configure edge-detection if I do "gpiocli request".

Just for the case it rings any bells, otherwise I'll look into it in the coming days... 

-- 
Alexander Sverdlin
Siemens AG
www.siemens.com




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux