Thread (22 messages) flat view 22 messages, 5 authors, 2015-11-25

Re: [PATCH v2 5/5] misc: eeprom_93xx46: Add support for a GPIO 'select' line.

From: Andrew Lunn <hidden>
Date: 2015-11-19 17:15:56
Also in: lkml

On Thu, Nov 19, 2015 at 06:52:57PM +0200, Vladimir Zapolskiy wrote:
On 19.11.2015 16:18, Andrew Lunn wrote:
quoted
quoted
quoted
 #ifdef CONFIG_OF
+static void select_assert(void *context)
+{
+	struct eeprom_93xx46_dev *edev = context;
+
+	gpiod_set_value_cansleep(gpio_to_desc(edev->pdata->select_gpio), 1);
I would suggest to use gpio_set_value()
Could you explain why?

Maybe this gpio is on an SPI GPIO expander?
My point is that gpio_*() interface, gpio_set_value() or
gpio_set_value_cansleep(), might be preferred is this particular case.
Ah, O.K, yes, avoid the gpio_to_desc() call.

Agreed.

	Andrew
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help