Re: [PATCH] rtc: omap: Support ext_wakeup configuration

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

 




Hi,

Sorry for such delay in response. Please see my comments/questions on
using pinctrl below.

On 26.04.2016 17:39, Tony Lindgren wrote:
* Marcin Niestroj <m.niestroj@xxxxxxxxxxxxxxxx> [160426 00:40]:
In below code we check reg resource size in order to know if we
should update RTC_PMIC or it is pinctrl responsibility. It's a little
hack, but we make sure, that every device with not modified device-tree
will work as previously. If we want to add support for ext_wakeup, we
just change reg resouce size in device-tree in order to not overlap
requested memory regions in rtc-omap and pinctrl.

I used am335x-chilisom instead of dra7 and updated
pinctrl-single,funcion-mask so the EXT_WAKEUP_STATUS is always cleared
after boot.

So the question now is: is this acceptable? Do we want to continue with
this approach?

Well the concern I have here is that we not use pinctrl-single
as a separate driver if any of the registers are shared with
the RTC driver. If the registers are shared, the pinctrl
functionality should be implemented in the RTC driver.

We can use pinctrl generic params for:
 * enable wakeup inputs - with 'input-enable'
 * input debounce enable/configuration - with 'input-debounce'

However I don't see any generic way for setting wakeup input polarity.
So I guess we should add some driver specific devicetree binding to
handle hat. I also didn't find any other driver that implements it.

In case of pinctrl-single we have just written custom register values to
set polarity.

So the question is: how should we proceed? Is pinctrl still and option?
If yes, what is your idea about configuring input polarity?


The pinctrl driver can also implement a chained IRQ later
on for consumer device drivers to use with the wakeirq API.
Maybe eventually we'll have real chained interrupt for the
RTC to use from Linux side of the C-M3 driver.

Regards,

Tony



--
Marcin Niestroj
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux