All of lore.kernel.org
 help / color / mirror / Atom feed
From: alexandre.belloni@bootlin.com (Alexandre Belloni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 1/6] ARM: at91: add TCB registers definitions
Date: Thu, 26 Apr 2018 19:48:43 +0200	[thread overview]
Message-ID: <20180426174843.GT4813@piout.net> (raw)
In-Reply-To: <20180426165242.x5pvpyfirkmvvqjo@breakpoint.cc>

On 26/04/2018 18:52:43+0200, Sebastian Andrzej Siewior wrote:
> On 2018-04-18 12:51:38 [+0200], Alexandre Belloni wrote:
> > diff --git a/include/soc/at91/atmel_tcb.h b/include/soc/at91/atmel_tcb.h
> > new file mode 100644
> > index 000000000000..d263ea677225
> > --- /dev/null
> > +++ b/include/soc/at91/atmel_tcb.h
> ?
> > +static inline struct clk *tcb_clk_get(struct device_node *node, int channel)
> > +{
> > +	struct clk *clk;
> > +	char clk_name[] = "t0_clk";
> > +
> > +	clk_name[1] += channel;
> > +	clk = of_clk_get_by_name(node->parent, clk_name);
> > +	if (!IS_ERR(clk))
> > +		return clk;
> > +
> > +	return of_clk_get_by_name(node->parent, "t0_clk");
> > +}
> > +
> > +static inline int tcb_irq_get(struct device_node *node, int channel)
> > +{
> > +	int irq;
> > +
> > +	irq = of_irq_get(node->parent, channel);
> > +	if (irq > 0)
> > +		return irq;
> > +
> > +	return of_irq_get(node->parent, 0);
> > +}
> > +
> > +static const u8 atmel_tc_divisors[5] = { 2, 8, 32, 128, 0, };
> > +
> > +struct atmel_tcb_info {
> > +	int bits;
> > +};
> > +
> > +static const struct atmel_tcb_info atmel_tcb_infos[] = {
> > +	{ .bits = 16 },
> > +	{ .bits = 32 },
> > +};
> > +
> > +static const struct of_device_id atmel_tcb_dt_ids[] = {
> > +	{
> > +		.compatible = "atmel,at91rm9200-tcb",
> > +		.data = &atmel_tcb_infos[0],
> > +	}, {
> > +		.compatible = "atmel,at91sam9x5-tcb",
> > +		.data = &atmel_tcb_infos[1],
> > +	}, {
> > +		/* sentinel */
> > +	}
> > +};
> 
> After the series is applied, I see only one user of that file. The data
> structures don't look like they belong here. Same goes for the static
> inline of the code above.
> 

There is another user coming later (the pwm driver) but I didn't repost,
I'll do so after this series is applied.

> > +#endif /* __SOC_ATMEL_TCB_H */
> 
> Sebastian

-- 
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2018-04-26 17:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-18 10:51 [PATCH v4 0/6] clocksource: rework Atmel TCB timer driver Alexandre Belloni
2018-04-18 10:51 ` [PATCH v4 1/6] ARM: at91: add TCB registers definitions Alexandre Belloni
2018-04-26 16:52   ` Sebastian Andrzej Siewior
2018-04-26 17:48     ` Alexandre Belloni [this message]
2018-04-18 10:51 ` [PATCH v4 2/6] clocksource/drivers: Add a new driver for the Atmel ARM TC blocks Alexandre Belloni
2018-04-18 10:51 ` [PATCH v4 3/6] clocksource/drivers: atmel-pit: make option silent Alexandre Belloni
2018-04-18 10:51 ` [PATCH v4 4/6] ARM: at91: Implement clocksource selection Alexandre Belloni
2018-04-18 10:51 ` [PATCH v4 5/6] ARM: configs: at91: use new TCB timer driver Alexandre Belloni
2018-04-18 10:51 ` [PATCH v4 6/6] ARM: configs: at91: unselect PIT Alexandre Belloni
2018-04-26 16:46 ` [PATCH v4 0/6] clocksource: rework Atmel TCB timer driver Sebastian Andrzej Siewior
2018-04-26 18:52   ` Alexandre Belloni
2018-05-02 13:34     ` Sebastian Andrzej Siewior
2018-05-02 18:10       ` Alexandre Belloni
2018-05-15 17:26         ` Sebastian Andrzej Siewior

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=20180426174843.GT4813@piout.net \
    --to=alexandre.belloni@bootlin.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.