Skip to content

Commit ff30ea1

Browse files
committed
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
2 parents 56cf10d + 21b3fb7 commit ff30ea1

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

drivers/regulator/pca9450-regulator.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,6 +1293,7 @@ static int pca9450_i2c_probe(struct i2c_client *i2c)
12931293
struct regulator_dev *ldo5;
12941294
struct pca9450 *pca9450;
12951295
unsigned int device_id, i;
1296+
const char *type_name;
12961297
int ret;
12971298

12981299
pca9450 = devm_kzalloc(&i2c->dev, sizeof(struct pca9450), GFP_KERNEL);
@@ -1303,15 +1304,22 @@ static int pca9450_i2c_probe(struct i2c_client *i2c)
13031304
case PCA9450_TYPE_PCA9450A:
13041305
regulator_desc = pca9450a_regulators;
13051306
pca9450->rcnt = ARRAY_SIZE(pca9450a_regulators);
1307+
type_name = "pca9450a";
13061308
break;
13071309
case PCA9450_TYPE_PCA9450BC:
13081310
regulator_desc = pca9450bc_regulators;
13091311
pca9450->rcnt = ARRAY_SIZE(pca9450bc_regulators);
1312+
type_name = "pca9450bc";
13101313
break;
13111314
case PCA9450_TYPE_PCA9451A:
1315+
regulator_desc = pca9451a_regulators;
1316+
pca9450->rcnt = ARRAY_SIZE(pca9451a_regulators);
1317+
type_name = "pca9451a";
1318+
break;
13121319
case PCA9450_TYPE_PCA9452:
13131320
regulator_desc = pca9451a_regulators;
13141321
pca9450->rcnt = ARRAY_SIZE(pca9451a_regulators);
1322+
type_name = "pca9452";
13151323
break;
13161324
default:
13171325
dev_err(&i2c->dev, "Unknown device type");
@@ -1369,7 +1377,7 @@ static int pca9450_i2c_probe(struct i2c_client *i2c)
13691377
if (pca9450->irq) {
13701378
ret = devm_request_threaded_irq(pca9450->dev, pca9450->irq, NULL,
13711379
pca9450_irq_handler,
1372-
(IRQF_TRIGGER_FALLING | IRQF_ONESHOT),
1380+
(IRQF_TRIGGER_LOW | IRQF_ONESHOT),
13731381
"pca9450-irq", pca9450);
13741382
if (ret != 0)
13751383
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)
14131421
pca9450_i2c_restart_handler, pca9450))
14141422
dev_warn(&i2c->dev, "Failed to register restart handler\n");
14151423

1416-
dev_info(&i2c->dev, "%s probed.\n",
1417-
type == PCA9450_TYPE_PCA9450A ? "pca9450a" :
1418-
(type == PCA9450_TYPE_PCA9451A ? "pca9451a" : "pca9450bc"));
1424+
dev_info(&i2c->dev, "%s probed.\n", type_name);
14191425

14201426
return 0;
14211427
}

0 commit comments

Comments
 (0)