linux/drivers/clk/x86/clk-lpss.h
Mika Westerberg 701190fd74 clk: x86: add support for Lynxpoint LPSS clocks
Intel Lynxpoint Low Power Subsystem hosts peripherals like UART, I2C and
SPI controllers. For most of these there is a configuration register that
allows software to enable and disable the functional clock. Disabling the
clock while the peripheral is not used saves power.

In order to take advantage of this we add a new clock gate of type
lpss_gate that just re-uses the ordinary clk_gate but in addition is able
to enumerate the base address register of the device using ACPI.

We then create a clock tree that models the Lynxpoint LPSS clocks using
these gates and fixed clocks so that we can pass clock rate to the drivers
as well.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-01-23 21:14:22 +01:00

37 lines
930 B
C

/*
* Intel Low Power Subsystem clock.
*
* Copyright (C) 2013, Intel Corporation
* Authors: Mika Westerberg <mika.westerberg@linux.intel.com>
* Heikki Krogerus <heikki.krogerus@linux.intel.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef __CLK_LPSS_H
#define __CLK_LPSS_H
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/clk.h>
#ifdef CONFIG_ACPI
extern struct clk *clk_register_lpss_gate(const char *name,
const char *parent_name,
const char *hid, const char *uid,
unsigned offset);
#else
static inline struct clk *clk_register_lpss_gate(const char *name,
const char *parent_name,
const char *hid,
const char *uid,
unsigned offset)
{
return ERR_PTR(-ENODEV);
}
#endif
#endif /* __CLK_LPSS_H */