All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	linux-acpi@vger.kernel.org
Subject: Re: [PATCH 4/4] ACPI / LPSS: remove struct lpss_shared_clock
Date: Tue, 02 Sep 2014 11:47:43 +0300	[thread overview]
Message-ID: <1409647663.30155.71.camel@linux.intel.com> (raw)
In-Reply-To: <1409644510-26397-5-git-send-email-heikki.krogerus@linux.intel.com>

On Tue, 2014-09-02 at 10:55 +0300, Heikki Krogerus wrote:
> Nothing requires it anymore. The PWM driver no longer
> uses clk framework to get the rate.
> 
> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> ---
>  drivers/acpi/acpi_lpss.c | 39 ++-------------------------------------
>  1 file changed, 2 insertions(+), 37 deletions(-)
> 
> diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
> index b693098..bcbdbd2 100644
> --- a/drivers/acpi/acpi_lpss.c
> +++ b/drivers/acpi/acpi_lpss.c
> @@ -61,19 +61,12 @@ ACPI_MODULE_NAME("acpi_lpss");
>  #define LPSS_LTR			BIT(3)
>  #define LPSS_SAVE_CTX			BIT(4)
>  
> -struct lpss_shared_clock {
> -	const char *name;
> -	unsigned long rate;
> -	struct clk *clk;
> -};
> -
>  struct lpss_private_data;
>  
>  struct lpss_device_desc {
>  	unsigned int flags;
>  	unsigned int prv_offset;
>  	size_t prv_size_override;
> -	struct lpss_shared_clock *shared_clock;
>  	void (*setup)(struct lpss_private_data *pdata);
>  };
>  
> @@ -140,14 +133,8 @@ static struct lpss_device_desc lpt_sdio_dev_desc = {
>  	.prv_size_override = 0x1018,
>  };
>  
> -static struct lpss_shared_clock pwm_clock = {
> -	.name = "pwm_clk",
> -	.rate = 25000000,
> -};
> -
>  static struct lpss_device_desc byt_pwm_dev_desc = {
> -	.flags = LPSS_CLK | LPSS_SAVE_CTX,
> -	.shared_clock = &pwm_clock,
> +	.flags = LPSS_SAVE_CTX,
>  };
>  
>  static struct lpss_device_desc byt_uart_dev_desc = {
> @@ -171,16 +158,6 @@ static struct lpss_device_desc byt_i2c_dev_desc = {
>  	.setup = byt_i2c_setup,
>  };
>  
> -static struct lpss_shared_clock bsw_pwm_clock = {
> -	.name = "pwm_clk",
> -	.rate = 19200000,
> -};
> -
> -static struct lpss_device_desc bsw_pwm_dev_desc = {
> -	.flags = LPSS_CLK | LPSS_SAVE_CTX,
> -	.shared_clock = &bsw_pwm_clock,
> -};
> -
>  #else
>  
>  #define LPSS_ADDR(desc) (0UL)
> @@ -211,7 +188,7 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = {
>  	{ "INT33FC", },
>  
>  	/* Braswell LPSS devices */
> -	{ "80862288", LPSS_ADDR(bsw_pwm_dev_desc) },
> +	{ "80862288", LPSS_ADDR(byt_pwm_dev_desc) },
>  	{ "8086228A", LPSS_ADDR(byt_uart_dev_desc) },
>  	{ "8086228E", LPSS_ADDR(byt_spi_dev_desc) },
>  	{ "808622C1", LPSS_ADDR(byt_i2c_dev_desc) },
> @@ -251,7 +228,6 @@ static int register_device_clock(struct acpi_device *adev,
>  				 struct lpss_private_data *pdata)
>  {
>  	const struct lpss_device_desc *dev_desc = pdata->dev_desc;
> -	struct lpss_shared_clock *shared_clock = dev_desc->shared_clock;
>  	const char *devname = dev_name(&adev->dev);
>  	struct clk *clk = ERR_PTR(-ENODEV);
>  	struct lpss_clk_data *clk_data;
> @@ -273,17 +249,6 @@ static int register_device_clock(struct acpi_device *adev,
>  	parent = clk_data->name;
>  	prv_base = pdata->mmio_base + dev_desc->prv_offset;
>  
> -	if (shared_clock) {
> -		clk = shared_clock->clk;
> -		if (!clk) {
> -			clk = clk_register_fixed_rate(NULL, shared_clock->name,
> -						      "lpss_clk", 0,
> -						      shared_clock->rate);
> -			shared_clock->clk = clk;
> -		}
> -		parent = shared_clock->name;
> -	}
> -
>  	if (pdata->fixed_clk_rate) {
>  		clk = clk_register_fixed_rate(NULL, devname, parent, 0,
>  					      pdata->fixed_clk_rate);


-- 
Andy Shevchenko <andriy.shevchenko@intel.com>
Intel Finland Oy


  reply	other threads:[~2014-09-02  8:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-02  7:55 [PATCH 0/4] ACPI / LPSS: clock improvements Heikki Krogerus
2014-09-02  7:55 ` [PATCH 1/4] ACPI / LPSS: introduce flags Heikki Krogerus
2014-09-02  8:45   ` Andy Shevchenko
2014-09-02  7:55 ` [PATCH 2/4] ACPI / LPSS: drop clkdev_name member from lpss_device_desc Heikki Krogerus
2014-09-02  8:43   ` Andy Shevchenko
2014-09-02 10:34     ` Heikki Krogerus
2014-09-02 10:42       ` Andy Shevchenko
2014-09-02  7:55 ` [PATCH 3/4] ACPI / LPSS: support for 133MHz I2C source clock on Baytrail Heikki Krogerus
2014-09-02  7:55 ` [PATCH 4/4] ACPI / LPSS: remove struct lpss_shared_clock Heikki Krogerus
2014-09-02  8:47   ` Andy Shevchenko [this message]
2014-09-02 10:46 ` [PATCH 0/4] ACPI / LPSS: clock improvements Mika Westerberg
2014-09-03 21:49 ` Rafael J. Wysocki

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=1409647663.30155.71.camel@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rjw@rjwysocki.net \
    /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.