This repository has been archived on 2026-03-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
ubports_kernel_google_msm/include/linux/qpnp/clkdiv.h
Michael Bohan 12eb83a820 platform: msm: Add driver for QPNP PMIC clkdiv peripherals
This driver supports the Qualcomm PNP clkdiv peripheral. It
allowed for configuring divide factors for various clock outputs
on the PMIC. The source clock is CXO.

The driver allows for configuration of the clkdiv device through
Device Tree. Some optional parameters may be specified instead at
runtime with the qpnp_clkdiv_config() API.

Change-Id: I393ed0e4389fb3c1dfe0bcdb40944102d2e09894
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
2013-02-27 18:21:35 -08:00

36 lines
1.0 KiB
C

/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef QPNP_CLKDIV_H
#define QPNP_CLKDIV_H
enum q_clkdiv_cfg {
Q_CLKDIV_NO_CLK = 0,
Q_CLKDIV_XO_DIV_1,
Q_CLKDIV_XO_DIV_2,
Q_CLKDIV_XO_DIV_4,
Q_CLKDIV_XO_DIV_8,
Q_CLKDIV_XO_DIV_16,
Q_CLKDIV_XO_DIV_32,
Q_CLKDIV_XO_DIV_64,
Q_CLKDIV_INVALID,
};
struct q_clkdiv;
struct q_clkdiv *qpnp_clkdiv_get(struct device *dev, const char *name);
int qpnp_clkdiv_enable(struct q_clkdiv *q_clkdiv);
int qpnp_clkdiv_disable(struct q_clkdiv *q_clkdiv);
int qpnp_clkdiv_config(struct q_clkdiv *q_clkdiv,
enum q_clkdiv_cfg cfg);
#endif