Re: [RFC PATCH v2 08/10] rtc: bd70528: Initial support for ROHM bd70528 RTC

2019-01-29 Thread Jerry Hoemann
On Tue, Jan 29, 2019 at 09:01:03AM +0200, Matti Vaittinen wrote: > On Mon, Jan 28, 2019 at 01:26:56PM -0700, Jerry Hoemann wrote: > > On Sat, Jan 26, 2019 at 08:30:24AM -0800, Guenter Roeck wrote: > > > On 1/25/19 3:05 AM, Matti Vaittinen wrote: > > > > +static int bd70528_set_wake(struct bd70528 *

Re: [RFC PATCH v2 08/10] rtc: bd70528: Initial support for ROHM bd70528 RTC

2019-01-29 Thread Matti Vaittinen
Hello Alexandre, Big thanks for the review! On Mon, Jan 28, 2019 at 10:20:09PM +0100, Alexandre Belloni wrote: > Hello, > > On 25/01/2019 13:05:36+0200, Matti Vaittinen wrote: > > +static const struct rtc_class_ops bd70528_rtc_ops = { > > + .read_time = bd70528_get_time, > > + .set_time

Re: [RFC PATCH v2 08/10] rtc: bd70528: Initial support for ROHM bd70528 RTC

2019-01-28 Thread Matti Vaittinen
On Mon, Jan 28, 2019 at 01:26:56PM -0700, Jerry Hoemann wrote: > On Sat, Jan 26, 2019 at 08:30:24AM -0800, Guenter Roeck wrote: > > On 1/25/19 3:05 AM, Matti Vaittinen wrote: > > > +static int bd70528_set_wake(struct bd70528 *bd70528, > > > + int enable, int *old_state) > > > +{

Re: [RFC PATCH v2 08/10] rtc: bd70528: Initial support for ROHM bd70528 RTC

2019-01-28 Thread Alexandre Belloni
Hello, On 25/01/2019 13:05:36+0200, Matti Vaittinen wrote: > +static const struct rtc_class_ops bd70528_rtc_ops = { > + .read_time = bd70528_get_time, > + .set_time = bd70528_set_time, > + .read_alarm = bd70528_read_alarm, > + .set_alarm = bd70528_set_alarm, Yo

Re: [RFC PATCH v2 08/10] rtc: bd70528: Initial support for ROHM bd70528 RTC

2019-01-28 Thread Jerry Hoemann
On Sat, Jan 26, 2019 at 08:30:24AM -0800, Guenter Roeck wrote: > On 1/25/19 3:05 AM, Matti Vaittinen wrote: > > +static int bd70528_set_wake(struct bd70528 *bd70528, > > + int enable, int *old_state) > > +{ > > + int ret; > > + unsigned int ctrl_reg; > > + > > + ret =

Re: [RFC PATCH v2 08/10] rtc: bd70528: Initial support for ROHM bd70528 RTC

2019-01-28 Thread Matti Vaittinen
On Mon, Jan 28, 2019 at 06:02:47AM -0800, Guenter Roeck wrote: > On 1/27/19 11:48 PM, Matti Vaittinen wrote: > > Thanks again Guenter, > > > > On Sat, Jan 26, 2019 at 08:30:24AM -0800, Guenter Roeck wrote: > > > On 1/25/19 3:05 AM, Matti Vaittinen wrote: > > > > +/* > > > > + * We read regs RTC_SE

Re: [RFC PATCH v2 08/10] rtc: bd70528: Initial support for ROHM bd70528 RTC

2019-01-28 Thread Guenter Roeck
On 1/27/19 11:48 PM, Matti Vaittinen wrote: Thanks again Guenter, On Sat, Jan 26, 2019 at 08:30:24AM -0800, Guenter Roeck wrote: On 1/25/19 3:05 AM, Matti Vaittinen wrote: +/* + * We read regs RTC_SEC => RTC_YEAR + * this struct is ordered according to chip registers. + * Keep it u8 only to av

Re: [RFC PATCH v2 08/10] rtc: bd70528: Initial support for ROHM bd70528 RTC

2019-01-27 Thread Matti Vaittinen
Thanks again Guenter, On Sat, Jan 26, 2019 at 08:30:24AM -0800, Guenter Roeck wrote: > On 1/25/19 3:05 AM, Matti Vaittinen wrote: > > +/* > > + * We read regs RTC_SEC => RTC_YEAR > > + * this struct is ordered according to chip registers. > > + * Keep it u8 only to avoid padding issues. > > + */ >

Re: [RFC PATCH v2 08/10] rtc: bd70528: Initial support for ROHM bd70528 RTC

2019-01-26 Thread Guenter Roeck
On 1/25/19 3:05 AM, Matti Vaittinen wrote: Support RTC block in ROHM bd70528 power management IC. Support getting and setting the time and date as well as arming an alarm which can also be used to wake the PMIC from standby state. HW supports wake interrupt only for the next 24 hours (sec, minut

[RFC PATCH v2 08/10] rtc: bd70528: Initial support for ROHM bd70528 RTC

2019-01-25 Thread Matti Vaittinen
Support RTC block in ROHM bd70528 power management IC. Support getting and setting the time and date as well as arming an alarm which can also be used to wake the PMIC from standby state. HW supports wake interrupt only for the next 24 hours (sec, minute and hour information only) so we limit also