From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.free-electrons.com (down.free-electrons.com. [37.187.137.238]) by gmr-mx.google.com with ESMTP id w128si291315wmd.0.2016.03.03.05.11.02 for ; Thu, 03 Mar 2016 05:11:02 -0800 (PST) Date: Thu, 3 Mar 2016 13:57:38 +0100 From: Alexandre Belloni To: cvs268@gmail.com Cc: rtc-linux , a.zummo@towertech.it, robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, devicetree@vger.kernel.org, kernel@pengutronix.de, s.trumtrar@pengutronix.de Subject: [rtc-linux] Re: [PATCH v4 2/2] rtc: add driver for RX6110SA real time clock Message-ID: <20160303125738.GD2567@piout.net> References: <1451927075-8656-1-git-send-email-s.trumtrar@pengutronix.de> <1451927075-8656-2-git-send-email-s.trumtrar@pengutronix.de> <20160131115457.GL20165@piout.net> <20160131140418.GD11885@pengutronix.de> <6c5c65d7-2cee-4e3f-a91c-c9fbd4c006c7@googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 In-Reply-To: <6c5c65d7-2cee-4e3f-a91c-c9fbd4c006c7@googlegroups.com> Reply-To: rtc-linux@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Hi, On 03/03/2016 at 03:58:45 -0800, cvs268@gmail.com 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 -- -- 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. --- 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 email to rtc-linux+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexandre Belloni Subject: Re: [PATCH v4 2/2] rtc: add driver for RX6110SA real time clock Date: Thu, 3 Mar 2016 13:57:38 +0100 Message-ID: <20160303125738.GD2567@piout.net> References: <1451927075-8656-1-git-send-email-s.trumtrar@pengutronix.de> <1451927075-8656-2-git-send-email-s.trumtrar@pengutronix.de> <20160131115457.GL20165@piout.net> <20160131140418.GD11885@pengutronix.de> <6c5c65d7-2cee-4e3f-a91c-c9fbd4c006c7@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <6c5c65d7-2cee-4e3f-a91c-c9fbd4c006c7-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: cvs268-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Cc: rtc-linux , a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org, robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, pawel.moll-5wv7dgnIgG8@public.gmane.org, mark.rutland-5wv7dgnIgG8@public.gmane.org, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org, galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org, s.trumtrar-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org List-Id: devicetree@vger.kernel.org Hi, On 03/03/2016 at 03:58:45 -0800, cvs268-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html