Re: [PATCH RFC v2 5/6] ARM: pxa: Convert Spitz hsync to GPIO descriptors

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

 



On Tue, Sep 26, 2023 at 05:46:26PM +0200, Duje Mihanović wrote:
> Sharp's Spitz still uses the legacy GPIO interface in its
> wait_for_hsync() function.
> 
> Convert it to use the GPIO descriptor interface.

...

> +static struct gpio_desc *hsync = NULL;

Assignment is redundant.

...

>  	gpiod_add_lookup_table(&spitz_ads7846_gpio_table);
>  	gpiod_add_lookup_table(&spitz_spi_gpio_table);
> +	hsync = gpiod_get(NULL, "hsync", GPIOD_IN);
> +	if (IS_ERR(hsync)) {
> +		pr_err("Failed to get hsync GPIO: %ld\n", PTR_ERR(hsync));
> +		return;
> +	}
>  	pxa2xx_set_spi_info(2, &spitz_spi_info);
>  	spi_register_board_info(ARRAY_AND_SIZE(spitz_spi_devices));

Yeah, but the question is, if GPIO request fails, can we instantiate at least
one device and move on?

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux