mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
regulator: Fixes for v7.0
A couple of small driver specific fixes for pca9450, cleaning up logging and fixing warnings due to confusion with interrupt type. -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmm0OnQACgkQJNaLcl1U h9DvJQf/WkSqBKhj2ps47fRt1f5paUFnuz40Ewxo8uiyY3UDN+l9epQ6fkHzWBq8 UBj4hekdZGf5F80KrbHTzNy4oV5cdBSf+SX/614KhMByqHVQVCwuO08+Nh6XzdCM bum4+zz7ghCdXoy4wmgAMMlcAxfML7r8/O0rlQtSRPjaTuf+GMISUMkBQpJBvK4R 1ej7P+v/K4ivzluXptUV3fO8TyTfbvoqny66yS696oqPnlnDBHk097A3Lx0RW4c1 cikUAAZWsqLxHmtLkQMy79cdA0tDAiurhvYhxho2P9fwCMb+PQBYzzwmQCMq1hqo qEilS+PRquStaTTHnAbpcP++mOVtBA== =tfUL -----END PGP SIGNATURE----- Merge tag 'regulator-fix-v7.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "A couple of small driver specific fixes for pca9450, cleaning up logging and fixing warnings due to confusion with interrupt type" * tag 'regulator-fix-v7.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: pca9450: Correct probed name for PCA9452 regulator: pca9450: Correct interrupt type
This commit is contained in:
commit
ff30ea1fb1
|
|
@ -1293,6 +1293,7 @@ static int pca9450_i2c_probe(struct i2c_client *i2c)
|
|||
struct regulator_dev *ldo5;
|
||||
struct pca9450 *pca9450;
|
||||
unsigned int device_id, i;
|
||||
const char *type_name;
|
||||
int ret;
|
||||
|
||||
pca9450 = devm_kzalloc(&i2c->dev, sizeof(struct pca9450), GFP_KERNEL);
|
||||
|
|
@ -1303,15 +1304,22 @@ static int pca9450_i2c_probe(struct i2c_client *i2c)
|
|||
case PCA9450_TYPE_PCA9450A:
|
||||
regulator_desc = pca9450a_regulators;
|
||||
pca9450->rcnt = ARRAY_SIZE(pca9450a_regulators);
|
||||
type_name = "pca9450a";
|
||||
break;
|
||||
case PCA9450_TYPE_PCA9450BC:
|
||||
regulator_desc = pca9450bc_regulators;
|
||||
pca9450->rcnt = ARRAY_SIZE(pca9450bc_regulators);
|
||||
type_name = "pca9450bc";
|
||||
break;
|
||||
case PCA9450_TYPE_PCA9451A:
|
||||
regulator_desc = pca9451a_regulators;
|
||||
pca9450->rcnt = ARRAY_SIZE(pca9451a_regulators);
|
||||
type_name = "pca9451a";
|
||||
break;
|
||||
case PCA9450_TYPE_PCA9452:
|
||||
regulator_desc = pca9451a_regulators;
|
||||
pca9450->rcnt = ARRAY_SIZE(pca9451a_regulators);
|
||||
type_name = "pca9452";
|
||||
break;
|
||||
default:
|
||||
dev_err(&i2c->dev, "Unknown device type");
|
||||
|
|
@ -1369,7 +1377,7 @@ static int pca9450_i2c_probe(struct i2c_client *i2c)
|
|||
if (pca9450->irq) {
|
||||
ret = devm_request_threaded_irq(pca9450->dev, pca9450->irq, NULL,
|
||||
pca9450_irq_handler,
|
||||
(IRQF_TRIGGER_FALLING | IRQF_ONESHOT),
|
||||
(IRQF_TRIGGER_LOW | IRQF_ONESHOT),
|
||||
"pca9450-irq", pca9450);
|
||||
if (ret != 0)
|
||||
return dev_err_probe(pca9450->dev, ret, "Failed to request IRQ: %d\n",
|
||||
|
|
@ -1413,9 +1421,7 @@ static int pca9450_i2c_probe(struct i2c_client *i2c)
|
|||
pca9450_i2c_restart_handler, pca9450))
|
||||
dev_warn(&i2c->dev, "Failed to register restart handler\n");
|
||||
|
||||
dev_info(&i2c->dev, "%s probed.\n",
|
||||
type == PCA9450_TYPE_PCA9450A ? "pca9450a" :
|
||||
(type == PCA9450_TYPE_PCA9451A ? "pca9451a" : "pca9450bc"));
|
||||
dev_info(&i2c->dev, "%s probed.\n", type_name);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user