Re: [PATCH 2/3] Debobs and ETK padconf implementation

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

 



> 
> Intead of __gpio_set_value(), this should be 
> 
>   gpio_direction_output(ETK_GPIO(gpio), value);
> 
> Because otherwise, the default direction defaults to input.
> 

Yes. The user should set the direction to output by himself. The idea is
that the kernel code should always be able to toggle the output value,
but the person debugging the system can still control if the GPIO value
is visible to the outside world or not. So I don't think the kernel
should force the direction, at least not implicitly.

> > +int debug_gpio_get(unsigned gpio)
> > +{
> > +	if (!debobs_initialized)
> > +		return -EINVAL;
> > +
> > +	WARN_ON(gpio >= NUM_OF_DEBOBS_PADS);
> > +	if (gpio < NUM_OF_DEBOBS_PADS)
> > +		return __gpio_get_value(ETK_GPIO(gpio));
> 
> I thing this should just be gpio_get_value() (no underscores)  and 
> then <linux/gpio.h> included.  The OMAP-specific inlines will be used
> anyways, so no need to use the __gpio* calls.
> 

There is only gpio_get_value_cansleep, while I want this functionality
to be always available, also in interrupthandlers. __gpio_get_value
warns if it would sleep.

Cheers,

Peter.

-- 
goa is a state of mind
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux