Linux RTC
 help / color / mirror / Atom feed
* [rtc-linux] [PATCH v1 0/4] rtc: pcf2127: a fix, a cleanup and two questionable features
@ 2015-10-02  9:17 Uwe Kleine-König
  2015-10-02  9:17 ` [rtc-linux] [PATCH v1 1/4] rtc: pcf2127: fix reading uninitialized value on RTC_READ_VL ioctl Uwe Kleine-König
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Uwe Kleine-König @ 2015-10-02  9:17 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: Alessandro Zummo, rtc-linux, kernel, Greg Kroah-Hartman,
	linux-kernel

Hello,

the fix and the cleanup should be fine. Patches 3 and 4 are probably
wrong (but still state of the art for other in-tree drivers) because
sysfs_create_file is called too late. See
http://kroah.com/log/blog/2013/06/26/how-to-create-a-sysfs-file-correctly/
for some details.

I failed to find how to do it correctly though:
 - the attributes are device specific, so device_driver::groups is wrong
 - for using the i2c's device group it's too late in .probe
 - the rtc's device is only malloc'd in rtc_device_register and when
   this returns it's already too late again.
 - these are neither class nor bus attributes, so these are ruled out, too.

Uwe Kleine-K=C3=B6nig (4):
  rtc: pcf2127: fix reading uninitialized value on RTC_READ_VL ioctl
  rtc: pcf2127: remove useless driver version
  rtc: pcf2127: implement reading battery status bits
  rtc: pcf2127: implement access to nvram

 drivers/rtc/rtc-pcf2127.c | 285 ++++++++++++++++++++++++++++++++++++++++++=
----
 1 file changed, 261 insertions(+), 24 deletions(-)

--=20
2.6.0

--=20
--=20
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---=20
You received this message because you are subscribed to the Google Groups "=
rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-10-18  0:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-02  9:17 [rtc-linux] [PATCH v1 0/4] rtc: pcf2127: a fix, a cleanup and two questionable features Uwe Kleine-König
2015-10-02  9:17 ` [rtc-linux] [PATCH v1 1/4] rtc: pcf2127: fix reading uninitialized value on RTC_READ_VL ioctl Uwe Kleine-König
2015-10-18  0:14   ` [rtc-linux] " Alexandre Belloni
2015-10-02  9:17 ` [rtc-linux] [PATCH v1 2/4] rtc: pcf2127: remove useless driver version Uwe Kleine-König
2015-10-18  0:14   ` [rtc-linux] " Alexandre Belloni
2015-10-02  9:17 ` [rtc-linux] [PATCH v1 3/4 RFC] rtc: pcf2127: implement reading battery status bits Uwe Kleine-König
2015-10-02  9:17 ` [rtc-linux] [PATCH v1 4/4 RFC] rtc: pcf2127: implement access to nvram Uwe Kleine-König
2015-10-14 23:50 ` [rtc-linux] Re: [PATCH v1 0/4] rtc: pcf2127: a fix, a cleanup and two questionable features Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox