Message ID | 20220606171436.2438051-1-broonie@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i2c: tda9950: Lower severity of log message about missing interrupts | expand |
On Mon, Jun 06, 2022 at 06:14:36PM +0100, Mark Brown wrote: > The tda9950 driver prints an error message if it is instantiated without > an interrupt being available since the device is non-functional in that > case. Unfortunately due to packaging of tda9950 with tda998x series devices > the tda998x driver unconditionally instantiates a tda9950 so systems with a > tda998x configured without an interrupt will trigger this error message > during boot if tda9950 support is available. Reduce the severity to debug > level so this is less likely to be presented to end users, the information > is still there for system integrators who run into problems. > > We could add a check for an interrupt to the tda998x driver instead but > this feels better from an encapsulation point of view, there's still a log > message to help anyone doing system integration. As the tda998x also makes use of the interrupt, it would be trivial to avoid instantiating the tda9950 device if there's no interrupt. tda9950 does require it, and if it's missing, then it isn't functional. No point wasting memory on the struct device.
diff --git a/drivers/gpu/drm/i2c/tda9950.c b/drivers/gpu/drm/i2c/tda9950.c index 5b03fdd1eaa4..781d5665cd04 100644 --- a/drivers/gpu/drm/i2c/tda9950.c +++ b/drivers/gpu/drm/i2c/tda9950.c @@ -397,7 +397,7 @@ static int tda9950_probe(struct i2c_client *client, /* We must have an interrupt to be functional. */ if (client->irq <= 0) { - dev_err(&client->dev, "driver requires an interrupt\n"); + dev_dbg(&client->dev, "driver requires an interrupt\n"); return -ENXIO; }
The tda9950 driver prints an error message if it is instantiated without an interrupt being available since the device is non-functional in that case. Unfortunately due to packaging of tda9950 with tda998x series devices the tda998x driver unconditionally instantiates a tda9950 so systems with a tda998x configured without an interrupt will trigger this error message during boot if tda9950 support is available. Reduce the severity to debug level so this is less likely to be presented to end users, the information is still there for system integrators who run into problems. We could add a check for an interrupt to the tda998x driver instead but this feels better from an encapsulation point of view, there's still a log message to help anyone doing system integration. Signed-off-by: Mark Brown <broonie@kernel.org> --- drivers/gpu/drm/i2c/tda9950.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)