Hi, On 03/03/2016 at 03:58:45 -0800, cvs268@xxxxxxxxx wrote : > > > > > > If the need ever arises to also support the I2C variant, this driver > > > > could easily be refactored to support both cases. > > > I will soon be getting an embedded board with this RX6110 RTC on it > connected via I2C. > So i would like to take-up the task of adding I2C support in a few weeks. > > A quick search shows drivers/rtc/rtc-rx4581.c was similarly written based > on drivers/rtc/rtc-rx8581.c > > Q. Should i proceed to create drivers/rtc/rtc-rx6110-i2c.c or whats the > recommended approach? > I did not find any RTC driver that supports both i2c and spi (eg. depending > upon some config option) > You can have a look at sound/soc/codecs/wm8750.c which register one driver for both i2c and spi. It is simple enough and you should be able to do the same. Obviously, a new category will be needed in the Kconfig to handle RTC that are both spi and i2c with the same part number. -- Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html