From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: cvs268@gmail.com
Cc: rtc-linux <rtc-linux@googlegroups.com>,
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
Date: Thu, 3 Mar 2016 13:57:38 +0100 [thread overview]
Message-ID: <20160303125738.GD2567@piout.net> (raw)
In-Reply-To: <6c5c65d7-2cee-4e3f-a91c-c9fbd4c006c7@googlegroups.com>
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.
WARNING: multiple messages have this Message-ID (diff)
From: Alexandre Belloni <alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
To: cvs268-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: rtc-linux <rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>,
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
Subject: Re: [PATCH v4 2/2] rtc: add driver for RX6110SA real time clock
Date: Thu, 3 Mar 2016 13:57:38 +0100 [thread overview]
Message-ID: <20160303125738.GD2567@piout.net> (raw)
In-Reply-To: <6c5c65d7-2cee-4e3f-a91c-c9fbd4c006c7-/JYPxA39Uh5TLH3MbocFFw@public.gmane.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
next prev parent reply other threads:[~2016-03-03 13:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-04 17:04 [rtc-linux] [PATCH v4 1/2] Documentation: devicetree: add epson rx6110 binding Steffen Trumtrar
2016-01-04 17:04 ` Steffen Trumtrar
2016-01-04 17:04 ` [rtc-linux] [PATCH v4 2/2] rtc: add driver for RX6110SA real time clock Steffen Trumtrar
2016-01-04 17:04 ` Steffen Trumtrar
2016-01-31 11:54 ` [rtc-linux] " Alexandre Belloni
2016-01-31 11:54 ` Alexandre Belloni
2016-01-31 14:04 ` [rtc-linux] " Steffen Trumtrar
2016-01-31 14:04 ` Steffen Trumtrar
2016-03-03 11:58 ` [rtc-linux] " cvs268
2016-03-03 11:58 ` cvs268
2016-03-03 12:57 ` Alexandre Belloni [this message]
2016-03-03 12:57 ` Alexandre Belloni
2016-01-31 11:53 ` [rtc-linux] Re: [PATCH v4 1/2] Documentation: devicetree: add epson rx6110 binding Alexandre Belloni
2016-01-31 11:53 ` Alexandre Belloni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160303125738.GD2567@piout.net \
--to=alexandre.belloni@free-electrons.com \
--cc=a.zummo@towertech.it \
--cc=cvs268@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=kernel@pengutronix.de \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=rtc-linux@googlegroups.com \
--cc=s.trumtrar@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.