Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1238059

[PATCH v1 0/4] rtc: pcf2127: a fix, a cleanup and two questionable features

From Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Newsgroups linux.kernel
Subject [PATCH v1 0/4] rtc: pcf2127: a fix, a cleanup and two questionable features
Date 2015-10-02 11:20 +0200
Message-ID <qf4Fr-7v7-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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önig (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(-)

-- 
2.6.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH v1 0/4] rtc: pcf2127: a fix, a cleanup and two questionable features Uwe Kleine-König   <u.kleine-koenig@pengutronix.de> - 2015-10-02 11:20 +0200
  [PATCH v1 1/4] rtc: pcf2127: fix reading uninitialized value on RTC_READ_VL ioctl Uwe Kleine-König   <u.kleine-koenig@pengutronix.de> - 2015-10-02 11:20 +0200

csiph-web