Re: [PATCH libgpiod 1/2] bindings: python: properly pass event clock settings

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

 



On Wed, Jul 31, 2024 at 12:46:57PM +0200, Bartosz Golaszewski wrote:
> From: Benjamin Cabé <kartben@xxxxxxxxx>
>
> Python binding was ignoring event_clock line setting.
>
> Signed-off-by: Benjamin Cabé <kartben@xxxxxxxxx>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
> ---
>  bindings/python/gpiod/ext/line-settings.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/bindings/python/gpiod/ext/line-settings.c b/bindings/python/gpiod/ext/line-settings.c
> index 2cacbef..650235e 100644
> --- a/bindings/python/gpiod/ext/line-settings.c
> +++ b/bindings/python/gpiod/ext/line-settings.c
> @@ -79,6 +79,10 @@ line_settings_init(line_settings_object *self, PyObject *args, PyObject *kwargs)
>  	if (ret)
>  		return set_error();
>
> +	ret = gpiod_line_settings_set_event_clock(self->settings, event_clock);
> +	if (ret)
> +		return set_error();
> +
>  	return 0;
>  }
>

I'm ok with this series, but the gap this identifies in test coverage
bothers me - are there any other attributes that are not round-trip tested?
Debounce immediately springs to mind.  Bias?  Drive?  Even active_low?
Maybe add or extend a test case to excerise those in a separate patch?

Reviewed-by: Kent Gibson <warthog618@xxxxxxxxx>




[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