mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 14:43:16 +00:00
clk: rs9: Limit check to vendor ID in VID register
Extract only vendor ID from VID register, the top 4 bits are revision ID which are not useful for the vendor ID check. Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Link: https://lore.kernel.org/r/20231113221949.111964-2-marek.vasut+renesas@mailbox.org Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
parent
ff1b5154b5
commit
780da7f11a
@ -42,6 +42,7 @@
|
||||
#define RS9_REG_DID 0x6
|
||||
#define RS9_REG_BCP 0x7
|
||||
|
||||
#define RS9_REG_VID_MASK GENMASK(3, 0)
|
||||
#define RS9_REG_VID_IDT 0x01
|
||||
|
||||
#define RS9_REG_DID_TYPE_FGV (0x0 << RS9_REG_DID_TYPE_SHIFT)
|
||||
@ -333,6 +334,7 @@ static int rs9_probe(struct i2c_client *client)
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
vid &= RS9_REG_VID_MASK;
|
||||
if (vid != RS9_REG_VID_IDT || did != rs9->chip_info->did)
|
||||
return dev_err_probe(&client->dev, -ENODEV,
|
||||
"Incorrect VID/DID: %#02x, %#02x. Expected %#02x, %#02x\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user