Commit Graph

5 Commits

Author SHA1 Message Date
Mia Lin 14688f1a91 rtc: nuvoton: Compatible with NCT3015Y-R and NCT3018Y-R
The NCT3015Y-R and NCT3018Y-R use the same datasheet
    but have different topologies as follows.
- Topology (Only 1st i2c can set TWO bit and HF bit)
  In NCT3015Y-R,
    rtc 1st i2c is connected to a host CPU
    rtc 2nd i2c is connected to a BMC
  In NCT3018Y-R,
    rtc 1st i2c is connected to a BMC
    rtc 2nd i2c is connected to a host CPU
In order to be compatible with NCT3015Y-R and NCT3018Y-R,
- In probe,
  If part number is NCT3018Y-R, only set HF bit to 24-Hour format.
  Else, do nothing
- In set_time,
  If part number is NCT3018Y-R && TWO bit is 0,
     change TWO bit to 1, and restore TWO bit after updating time.

Signed-off-by: Mia Lin <mimi05633@gmail.com>
Link: https://lore.kernel.org/r/20231113103807.1036978-2-mimi05633@gmail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2024-01-18 01:05:33 +01:00
Zhu Wang 4f3688dca1 rtc: remove redundant of_match_ptr()
Signed-off-by: Zhu Wang <wangzhu9@huawei.com>
Link: https://lore.kernel.org/r/20230808115213.154377-2-wangzhu9@huawei.com
Link: https://lore.kernel.org/r/20230808115213.154377-3-wangzhu9@huawei.com
Link: https://lore.kernel.org/r/20230808115213.154377-4-wangzhu9@huawei.com
Link: https://lore.kernel.org/r/20230808115213.154377-5-wangzhu9@huawei.com
Link: https://lore.kernel.org/r/20230808115213.154377-6-wangzhu9@huawei.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-08-10 09:45:41 +02:00
Uwe Kleine-König 31b0cecb40 rtc: Switch i2c drivers back to use .probe()
After commit b8a1a4cd5a ("i2c: Provide a temporary .probe_new()
call-back type"), all drivers being converted to .probe_new() and then
03c835f498 ("i2c: Switch .probe() to not take an id parameter") convert
back to (the new) .probe() to be able to eventually drop .probe_new() from
struct i2c_driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230505121136.1185653-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-06-06 23:29:37 +02:00
Uwe Kleine-König c050dedb87 rtc: nct3018y: Convert to .probe_new()
The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20221021130706.178687-6-u.kleine-koenig@pengutronix.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2022-11-15 21:01:33 +01:00
Mia Lin 5adbaed16c rtc: Add NCT3018Y real time clock driver
Add real time clock support for NCT3018Y.

Signed-off-by: Mia Lin <mimi05633@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20220713090647.8028-4-mimi05633@gmail.com
2022-07-26 17:07:04 +02:00