[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160420215218.GE1546@katana>
Date: Wed, 20 Apr 2016 23:52:19 +0200
From: Wolfram Sang <wsa@...-dreams.de>
To: Jan Glauber <jglauber@...ium.com>
Cc: linux-kernel@...r.kernel.org, linux-i2c@...r.kernel.org,
David Daney <ddaney@...iumnetworks.com>,
David Daney <david.daney@...ium.com>
Subject: Re: [PATCH v6 10/19] i2c: octeon: Add support for cn78xx chips
On Mon, Apr 11, 2016 at 05:28:41PM +0200, Jan Glauber wrote:
> From: David Daney <david.daney@...ium.com>
>
> cn78xx has a different interrupt architecture, so we have to manage
> the interrupts differently.
I'd appreciate if you could explain here why interrupts use NOAUTOEN and
have to be manually en-/disabled? This is surely unusual.
>
> Signed-off-by: David Daney <ddaney@...iumnetworks.com>
> Signed-off-by: Jan Glauber <jglauber@...ium.com>
> ---
> drivers/i2c/busses/i2c-octeon.c | 131 ++++++++++++++++++++++++++++++++++++----
> 1 file changed, 120 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-octeon.c b/drivers/i2c/busses/i2c-octeon.c
> index 0bb9f0b..fff1ac0 100644
> --- a/drivers/i2c/busses/i2c-octeon.c
> +++ b/drivers/i2c/busses/i2c-octeon.c
> @@ -11,6 +11,7 @@
> * warranty of any kind, whether express or implied.
> */
>
> +#include <linux/atomic.h>
> #include <linux/platform_device.h>
> #include <linux/interrupt.h>
> #include <linux/kernel.h>
> @@ -112,11 +113,18 @@ struct octeon_i2c {
> wait_queue_head_t queue;
> struct i2c_adapter adap;
> int irq;
> + int hlc_irq; /* For cn7890 only */
> u32 twsi_freq;
> int sys_freq;
> void __iomem *twsi_base;
> struct device *dev;
> bool hlc_enabled;
> + void (*int_en)(struct octeon_i2c *);
> + void (*int_dis)(struct octeon_i2c *);
> + void (*hlc_int_en)(struct octeon_i2c *);
> + void (*hlc_int_dis)(struct octeon_i2c *);
I'd prefer having 'enable' and 'disable' written out, but I leave that
to you.
> + atomic_t int_en_cnt;
> + atomic_t hlc_int_en_cnt;
> };
>
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists