[rtc-linux] Re: [rtc] 4cd8adb100: WARNING: CPU: 0 PID: 1 at lib/kobject.c:690 kobject_put

2017-03-16 Thread Greg Kroah-Hartman
On Fri, Mar 17, 2017 at 03:11:37PM +0900, Greg Kroah-Hartman wrote: > On Thu, Mar 16, 2017 at 11:23:26PM -0600, Logan Gunthorpe wrote: > > Hey, > > > > I think I see the issue here: in a couple of error conditions, the RTC > > code will not initialize and ask for the cdev. However, my change will

[rtc-linux] Re: [rtc] 4cd8adb100: WARNING: CPU: 0 PID: 1 at lib/kobject.c:690 kobject_put

2017-03-16 Thread Greg Kroah-Hartman
On Thu, Mar 16, 2017 at 11:23:26PM -0600, Logan Gunthorpe wrote: > Hey, > > I think I see the issue here: in a couple of error conditions, the RTC > code will not initialize and ask for the cdev. However, my change will > always call cdev_add and cdev_del even though the rtc code did not call > cd

[rtc-linux] Re: [rtc] 4cd8adb100: WARNING: CPU: 0 PID: 1 at lib/kobject.c:690 kobject_put

2017-03-16 Thread Logan Gunthorpe
Hey, I think I see the issue here: in a couple of error conditions, the RTC code will not initialize and ask for the cdev. However, my change will always call cdev_add and cdev_del even though the rtc code did not call cdev_init. I'll have to add a guard around dev->devt in the new cdev_device fun

[rtc-linux] Re: [PATCH v3 01/16] chardev: add helper function to register char devs with a struct device

2017-03-16 Thread Greg Kroah-Hartman
On Thu, Mar 16, 2017 at 11:38:40AM -0600, Logan Gunthorpe wrote: > > I don't know why kbuild didn't catch these before, but it looks like we > > really need to include device.h in cdev.h now to fix up these build > > warnings, right? > > > I'll try that out and rebase the char-misc-testing tree in

[rtc-linux] Re: [PATCH] rtc: cpcap: kfreeing devm allocated memory

2017-03-16 Thread Alexandre Belloni
On 14/03/2017 at 10:56:30 +0300, Dan Carpenter wrote: > We shouldn't kfree(rtc) because is devm_ managed memory. It leads to a > double free. > > Fixes: dd3bf50b35e3 ("rtc: cpcap: new rtc driver") > Signed-off-by: Dan Carpenter > Applied, thanks. -- Alexandre Belloni, Free Electrons Embedded

[rtc-linux] Re: [PATCH] rtc: rtc-wm8350: Remove unused to_wm8350_from_rtc_dev

2017-03-16 Thread Alexandre Belloni
On 11/03/2017 at 15:42:13 +0900, Nobuhiro Iwamatsu wrote: > The to_wm8350_from_rtc_dev macro is not used by anything in the > rtc-wm8350 driver. > > Signed-off-by: Nobuhiro Iwamatsu > --- > drivers/rtc/rtc-wm8350.c | 2 -- > 1 file changed, 2 deletions(-) > Applied, thanks. -- Alexandre Bello

[rtc-linux] [PATCH 5/5] ARM: dts: rskrza1: add rtc DT support

2017-03-16 Thread Chris Brandt
Signed-off-by: Chris Brandt --- arch/arm/boot/dts/r7s72100-rskrza1.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/r7s72100-rskrza1.dts b/arch/arm/boot/dts/r7s72100-rskrza1.dts index 6abb929..dfbb028 100644 --- a/arch/arm/boot/dts/r7s72100-rskrza1.dts +++ b/arch/arm

[rtc-linux] [PATCH 4/5] ARM: dts: r7s72100: add rtc to device tree

2017-03-16 Thread Chris Brandt
Signed-off-by: Chris Brandt --- arch/arm/boot/dts/r7s72100.dtsi | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/r7s72100.dtsi b/arch/arm/boot/dts/r7s72100.dtsi index 2a42a79..e047fc8 100644 --- a/arch/arm/boot/dts/r7s72100.dtsi +++ b/arch/arm/boot/dts/r7s72100.d

[rtc-linux] [PATCH 1/5] rtc: rtc-sh: add support for rza series

2017-03-16 Thread Chris Brandt
This same RTC is used in RZ/A series MPUs, therefore with some slight changes, this driver can be reused. Additionally, since ARM architectures require Device Tree configurations, device tree support has been added. Signed-off-by: Chris Brandt --- drivers/rtc/Kconfig | 4 ++-- drivers/rtc/rtc-

[rtc-linux] [PATCH 2/5] rtc: Add rtc-sh

2017-03-16 Thread Chris Brandt
rtc-sh is a RTC for SuperH and RZ/A SoCs. Signed-off-by: Chris Brandt --- Documentation/devicetree/bindings/rtc/rtc-sh.txt | 19 +++ 1 file changed, 19 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/rtc-sh.txt diff --git a/Documentation/devicetree/bindin

[rtc-linux] [PATCH 0/5] rtc: Reuse rtc-sh driver to support RZ/A1

2017-03-16 Thread Chris Brandt
Basically, the same RTC that was used in SuperH devices is now used in RZ/A1 devices. Therefore with some slight changes, that driver can be reused. Additionally, since ARM architectures require Device Tree configurations, device tree support has been added. This was tested on RZ/A1H RSK board. O

[rtc-linux] [PATCH 3/5] ARM: dts: r7s72100: add rtc clock to device tree

2017-03-16 Thread Chris Brandt
Signed-off-by: Chris Brandt --- arch/arm/boot/dts/r7s72100.dtsi| 9 + include/dt-bindings/clock/r7s72100-clock.h | 3 +++ 2 files changed, 12 insertions(+) diff --git a/arch/arm/boot/dts/r7s72100.dtsi b/arch/arm/boot/dts/r7s72100.dtsi index ed62e19..2a42a79 100644 --- a/arch/

[rtc-linux] Re: [PATCH v3 16/16] switchtec: utilize new device_add_cdev helper function

2017-03-16 Thread Logan Gunthorpe
On 16/03/17 02:42 AM, Greg Kroah-Hartman wrote: > As this file isn't in 4.11-rc1, I can't take this patch, but I took all > of the others. You should resend this to Bjorn after 4.12-rc1 is out. Yup, I expected this. I'll keep an eye out and make sure it gets in when the time comes. Thanks, Lo

[rtc-linux] Re: [PATCH v3 01/16] chardev: add helper function to register char devs with a struct device

2017-03-16 Thread Logan Gunthorpe
> I don't know why kbuild didn't catch these before, but it looks like we > really need to include device.h in cdev.h now to fix up these build > warnings, right? > I'll try that out and rebase the char-misc-testing tree in the morning > to see if that fixes the build problems... Yeah, I think t

Re: [rtc-linux] RTC used as a module

2017-03-16 Thread Michal Simek
Hi John and Alexandre, On 6.3.2017 15:56, Michal Simek wrote: > On 3.3.2017 21:04, John Stultz wrote: >> On Fri, Mar 3, 2017 at 6:46 AM, Michal Simek wrote: >>> Hi Alexandre, >>> >>> On 3.3.2017 10:41, Michal Simek wrote: Hi Alexandre, On 23.2.2017 13:14, Alexandre Belloni wrote: >

[rtc-linux] Re: [PATCH v3 01/16] chardev: add helper function to register char devs with a struct device

2017-03-16 Thread Greg Kroah-Hartman
On Mon, Mar 06, 2017 at 12:04:17AM -0700, Logan Gunthorpe wrote: > Credit for this patch goes is shared with Dan Williams [1]. I've > taken things one step further to make the helper function more > useful and clean up calling code. > > There's a common pattern in the kernel whereby a struct cdev

[rtc-linux] Re: [PATCH v3 16/16] switchtec: utilize new device_add_cdev helper function

2017-03-16 Thread Greg Kroah-Hartman
On Mon, Mar 06, 2017 at 12:04:32AM -0700, Logan Gunthorpe wrote: > Very straightforward conversion to device_add_cdev. Drop cdev_add and > device_add and use cdev_device_add. > > Signed-off-by: Logan Gunthorpe > --- > drivers/pci/switch/switchtec.c | 11 ++- > 1 file changed, 2 insertion

Re: [rtc-linux] [PATCH v3 05/16] gpiolib: utilize new cdev_device_add helper function

2017-03-16 Thread Greg Kroah-Hartman
On Tue, Mar 14, 2017 at 04:28:28PM +0100, Linus Walleij wrote: > On Mon, Mar 6, 2017 at 8:04 AM, Logan Gunthorpe wrote: > > > Replace the open coded registration of the cdev and dev with the > > new device_add_cdev() helper. The helper replaces a common pattern by > > taking the proper reference