mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
mfd: MAX96752F: add stream id for each link
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com> Change-Id: I7e512351db58050c8550100c7a79c046dda5ea4e
This commit is contained in:
@@ -105,6 +105,11 @@ void max96752f_regcache_sync(struct max96752f *max96752f)
|
||||
|
||||
client->addr = addr;
|
||||
|
||||
regmap_update_bits(max96752f->regmap, 0x0050, STR_SEL,
|
||||
FIELD_PREP(STR_SEL, max96752f->stream_id));
|
||||
regmap_update_bits(max96752f->regmap, 0x0073, TX_SRC_ID,
|
||||
FIELD_PREP(TX_SRC_ID, max96752f->stream_id));
|
||||
|
||||
regcache_sync(max96752f->regmap);
|
||||
}
|
||||
EXPORT_SYMBOL(max96752f_regcache_sync);
|
||||
@@ -135,6 +140,11 @@ static int max96752f_i2c_probe(struct i2c_client *client)
|
||||
|
||||
max96752f->dev = dev;
|
||||
max96752f->client = client;
|
||||
|
||||
ret = device_property_read_u32(dev->parent, "reg", &max96752f->stream_id);
|
||||
if (ret)
|
||||
return dev_err_probe(dev, ret, "failed to get gmsl id\n");
|
||||
|
||||
i2c_set_clientdata(client, max96752f);
|
||||
|
||||
max96752f->regmap = devm_regmap_init_i2c(client,
|
||||
|
||||
@@ -54,6 +54,12 @@
|
||||
#define SLEEP BIT(3)
|
||||
#define LINK_CFG GENMASK(1, 0)
|
||||
|
||||
/* 0050h */
|
||||
#define STR_SEL GENMASK(1, 0)
|
||||
|
||||
/* 0073h */
|
||||
#define TX_SRC_ID GENMASK(2, 0)
|
||||
|
||||
/* 0108h */
|
||||
#define VID_LOCK BIT(6)
|
||||
|
||||
@@ -99,6 +105,7 @@ struct max96752f {
|
||||
struct regmap *regmap;
|
||||
struct i2c_client *client;
|
||||
struct i2c_mux_core *muxc;
|
||||
u32 stream_id;
|
||||
};
|
||||
|
||||
void max96752f_regcache_sync(struct max96752f *max96752f);
|
||||
|
||||
Reference in New Issue
Block a user