Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1383765
| From | Wolfram Sang <wsa@the-dreams.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v6 10/19] i2c: octeon: Add support for cn78xx chips |
| Date | 2016-04-21 00:00 +0200 |
| Message-ID | <rq8ka-6rk-3@gated-at.bofh.it> (permalink) |
| References | <rmLWN-81T-3@gated-at.bofh.it> <rmLWP-81T-35@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On Mon, Apr 11, 2016 at 05:28:41PM +0200, Jan Glauber wrote:
> From: David Daney <david.daney@cavium.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@caviumnetworks.com>
> Signed-off-by: Jan Glauber <jglauber@cavium.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;
> };
>
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH v6 10/19] i2c: octeon: Add support for cn78xx chips Wolfram Sang <wsa@the-dreams.de> - 2016-04-21 00:00 +0200 Re: [PATCH v6 10/19] i2c: octeon: Add support for cn78xx chips Wolfram Sang <wsa@the-dreams.de> - 2016-04-25 23:50 +0200
csiph-web