mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
soc: rockchip: io-domain: Sync with upstream
Change-Id: I3aa990729e988f08f384a10606cc2cf26d091b8a Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This commit is contained in:
@@ -68,15 +68,6 @@
|
||||
|
||||
struct rockchip_iodomain;
|
||||
|
||||
/**
|
||||
* @supplies: voltage settings matching the register bits.
|
||||
*/
|
||||
struct rockchip_iodomain_soc_data {
|
||||
int grf_offset;
|
||||
const char *supply_names[MAX_SUPPLIES];
|
||||
void (*init)(struct rockchip_iodomain *iod);
|
||||
};
|
||||
|
||||
struct rockchip_iodomain_supply {
|
||||
struct rockchip_iodomain *iod;
|
||||
struct regulator *reg;
|
||||
@@ -84,6 +75,13 @@ struct rockchip_iodomain_supply {
|
||||
int idx;
|
||||
};
|
||||
|
||||
struct rockchip_iodomain_soc_data {
|
||||
int grf_offset;
|
||||
const char *supply_names[MAX_SUPPLIES];
|
||||
void (*init)(struct rockchip_iodomain *iod);
|
||||
int (*write)(struct rockchip_iodomain_supply *supply, int uV);
|
||||
};
|
||||
|
||||
struct rockchip_iodomain {
|
||||
struct device *dev;
|
||||
struct regmap *grf;
|
||||
@@ -92,8 +90,7 @@ struct rockchip_iodomain {
|
||||
int (*write)(struct rockchip_iodomain_supply *supply, int uV);
|
||||
};
|
||||
|
||||
static int rk3568_pmu_iodomain_write(struct rockchip_iodomain_supply *supply,
|
||||
int uV)
|
||||
static int rk3568_iodomain_write(struct rockchip_iodomain_supply *supply, int uV)
|
||||
{
|
||||
struct rockchip_iodomain *iod = supply->iod;
|
||||
u32 is_3v3 = uV > MAX_VOLTAGE_1_8;
|
||||
@@ -504,6 +501,7 @@ static const struct rockchip_iodomain_soc_data soc_data_rk3568_pmu = {
|
||||
"vccio6",
|
||||
"vccio7",
|
||||
},
|
||||
.write = rk3568_iodomain_write,
|
||||
};
|
||||
|
||||
static const struct rockchip_iodomain_soc_data soc_data_rv1108 = {
|
||||
@@ -788,8 +786,8 @@ static int rockchip_iodomain_probe(struct platform_device *pdev)
|
||||
match = of_match_node(rockchip_iodomain_match, np);
|
||||
iod->soc_data = match->data;
|
||||
|
||||
if (IS_ENABLED(CONFIG_CPU_RK3568) && match->data == &soc_data_rk3568_pmu)
|
||||
iod->write = rk3568_pmu_iodomain_write;
|
||||
if (iod->soc_data->write)
|
||||
iod->write = iod->soc_data->write;
|
||||
else
|
||||
iod->write = rockchip_iodomain_write;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user