media: staging: max96712: Remove device id check
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Wed, 2 Oct 2024 09:23:28 +0000 (11:23 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 16 Oct 2024 07:32:38 +0000 (09:32 +0200)
This check is incorrect and checks the wrong register. Furthermore there
is no documented shared device id register for MAX96712. There might be
overlap with the soon to be added MAX96724 device which do document such
a register.

However as the check was merely a precaution and to check during
development that the driver could talk to the device there is no harm in
removing it all together. A correct and more sophisticated check can be
added later if there ever is a need to differentiate between different
versions of a device.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/max96712/max96712.c

index 6bdbccbee05ac31882a42055e5a6f6d8ea89aaaa..07f353f60e712358d6d7fcda897e93c56272790e 100644 (file)
@@ -16,8 +16,6 @@
 #include <media/v4l2-fwnode.h>
 #include <media/v4l2-subdev.h>
 
-#define MAX96712_ID 0x20
-
 #define MAX96712_DPLL_FREQ 1000
 
 enum max96712_pattern {
@@ -40,19 +38,6 @@ struct max96712_priv {
        enum max96712_pattern pattern;
 };
 
-static int max96712_read(struct max96712_priv *priv, int reg)
-{
-       int ret, val;
-
-       ret = regmap_read(priv->regmap, reg, &val);
-       if (ret) {
-               dev_err(&priv->client->dev, "read 0x%04x failed\n", reg);
-               return ret;
-       }
-
-       return val;
-}
-
 static int max96712_write(struct max96712_priv *priv, unsigned int reg, u8 val)
 {
        int ret;
@@ -438,9 +423,6 @@ static int max96712_probe(struct i2c_client *client)
        if (priv->gpiod_pwdn)
                usleep_range(4000, 5000);
 
-       if (max96712_read(priv, 0x4a) != MAX96712_ID)
-               return -ENODEV;
-
        max96712_reset(priv);
 
        ret = max96712_parse_dt(priv);