Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1383765 > unrolled thread

Re: [PATCH v6 10/19] i2c: octeon: Add support for cn78xx chips

Started byWolfram Sang <wsa@the-dreams.de>
First post2016-04-21 00:00 +0200
Last post2016-04-25 23:50 +0200
Articles 2 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  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

#1383765 — Re: [PATCH v6 10/19] i2c: octeon: Add support for cn78xx chips

FromWolfram Sang <wsa@the-dreams.de>
Date2016-04-21 00:00 +0200
SubjectRe: [PATCH v6 10/19] i2c: octeon: Add support for cn78xx chips
Message-ID<rq8ka-6rk-3@gated-at.bofh.it>

[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;
>  };
>  

[toc] | [next] | [standalone]


#1386934

FromWolfram Sang <wsa@the-dreams.de>
Date2016-04-25 23:50 +0200
Message-ID<rrWye-4kQ-21@gated-at.bofh.it>
In reply to#1383765

[Multipart message — attachments visible in raw view] — view raw

> Personally, I preferred the old way where each device had interrupt enable
> bits that could be controlled independently of the interrupt controller.  I
> have been told that I should abandon my preference for that type of
> antiquated architecture and welcome the brave new world of the unified
> interrupt enable bit.  Never the less, I still feel some nostalgia for the
> old way.

:) I think I am with you on this one.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web