* [PATCH] ARM i.MX31: Add i2c register convenience functions
@ 2016-07-27 14:52 Alexander Kurz
2016-08-03 5:28 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Kurz @ 2016-07-27 14:52 UTC (permalink / raw)
To: barebox; +Cc: Alexander Kurz
Signed-off-by: Alexander Kurz <akurz@blala.de>
---
arch/arm/mach-imx/include/mach/devices-imx31.h | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/arm/mach-imx/include/mach/devices-imx31.h b/arch/arm/mach-imx/include/mach/devices-imx31.h
index 63319fe..8169b98 100644
--- a/arch/arm/mach-imx/include/mach/devices-imx31.h
+++ b/arch/arm/mach-imx/include/mach/devices-imx31.h
@@ -2,6 +2,21 @@
#include <mach/imx31-regs.h>
#include <mach/devices.h>
+static inline struct device_d *imx31_add_i2c0(void *pdata)
+{
+ return imx_add_i2c((void *)MX31_I2C1_BASE_ADDR, 0, pdata);
+}
+
+static inline struct device_d *imx31_add_i2c1(void *pdata)
+{
+ return imx_add_i2c((void *)MX31_I2C2_BASE_ADDR, 1, pdata);
+}
+
+static inline struct device_d *imx31_add_i2c2(void *pdata)
+{
+ return imx_add_i2c((void *)MX31_I2C3_BASE_ADDR, 2, pdata);
+}
+
static inline struct device_d *imx31_add_spi0(struct spi_imx_master *pdata)
{
return imx_add_spi_imx27((void *)MX31_CSPI1_BASE_ADDR, 0, pdata);
--
2.1.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ARM i.MX31: Add i2c register convenience functions
2016-07-27 14:52 [PATCH] ARM i.MX31: Add i2c register convenience functions Alexander Kurz
@ 2016-08-03 5:28 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2016-08-03 5:28 UTC (permalink / raw)
To: Alexander Kurz; +Cc: barebox
On Wed, Jul 27, 2016 at 04:52:52PM +0200, Alexander Kurz wrote:
> Signed-off-by: Alexander Kurz <akurz@blala.de>
> ---
> arch/arm/mach-imx/include/mach/devices-imx31.h | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
Applied, thanks
Sascha
>
> diff --git a/arch/arm/mach-imx/include/mach/devices-imx31.h b/arch/arm/mach-imx/include/mach/devices-imx31.h
> index 63319fe..8169b98 100644
> --- a/arch/arm/mach-imx/include/mach/devices-imx31.h
> +++ b/arch/arm/mach-imx/include/mach/devices-imx31.h
> @@ -2,6 +2,21 @@
> #include <mach/imx31-regs.h>
> #include <mach/devices.h>
>
> +static inline struct device_d *imx31_add_i2c0(void *pdata)
> +{
> + return imx_add_i2c((void *)MX31_I2C1_BASE_ADDR, 0, pdata);
> +}
> +
> +static inline struct device_d *imx31_add_i2c1(void *pdata)
> +{
> + return imx_add_i2c((void *)MX31_I2C2_BASE_ADDR, 1, pdata);
> +}
> +
> +static inline struct device_d *imx31_add_i2c2(void *pdata)
> +{
> + return imx_add_i2c((void *)MX31_I2C3_BASE_ADDR, 2, pdata);
> +}
> +
> static inline struct device_d *imx31_add_spi0(struct spi_imx_master *pdata)
> {
> return imx_add_spi_imx27((void *)MX31_CSPI1_BASE_ADDR, 0, pdata);
> --
> 2.1.4
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-03 5:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-27 14:52 [PATCH] ARM i.MX31: Add i2c register convenience functions Alexander Kurz
2016-08-03 5:28 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox