sm501.c (3eb66e91a25497065c5322b1268cbc3953642227) | sm501.c (ae7b8eda27b33b1f688dfdebe4d46f690a8f9162) |
---|---|
1/* linux/drivers/mfd/sm501.c 2 * 3 * Copyright (C) 2006 Simtec Electronics 4 * Ben Dooks <ben@simtec.co.uk> 5 * Vincent Sanders <vince@simtec.co.uk> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 1131 unchanged lines hidden (view full) --- 1140 sizeof(struct i2c_gpio_platform_data)); 1141 if (!pdev) 1142 return -ENOMEM; 1143 1144 /* Create a gpiod lookup using gpiochip-local offsets */ 1145 lookup = devm_kzalloc(&pdev->dev, 1146 sizeof(*lookup) + 3 * sizeof(struct gpiod_lookup), 1147 GFP_KERNEL); | 1/* linux/drivers/mfd/sm501.c 2 * 3 * Copyright (C) 2006 Simtec Electronics 4 * Ben Dooks <ben@simtec.co.uk> 5 * Vincent Sanders <vince@simtec.co.uk> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 1131 unchanged lines hidden (view full) --- 1140 sizeof(struct i2c_gpio_platform_data)); 1141 if (!pdev) 1142 return -ENOMEM; 1143 1144 /* Create a gpiod lookup using gpiochip-local offsets */ 1145 lookup = devm_kzalloc(&pdev->dev, 1146 sizeof(*lookup) + 3 * sizeof(struct gpiod_lookup), 1147 GFP_KERNEL); |
1148 if (!lookup) 1149 return -ENOMEM; 1150 |
|
1148 lookup->dev_id = "i2c-gpio"; 1149 if (iic->pin_sda < 32) 1150 lookup->table[0].chip_label = "SM501-LOW"; 1151 else 1152 lookup->table[0].chip_label = "SM501-HIGH"; 1153 lookup->table[0].chip_hwnum = iic->pin_sda % 32; 1154 lookup->table[0].con_id = NULL; 1155 lookup->table[0].idx = 0; --- 592 unchanged lines hidden --- | 1151 lookup->dev_id = "i2c-gpio"; 1152 if (iic->pin_sda < 32) 1153 lookup->table[0].chip_label = "SM501-LOW"; 1154 else 1155 lookup->table[0].chip_label = "SM501-HIGH"; 1156 lookup->table[0].chip_hwnum = iic->pin_sda % 32; 1157 lookup->table[0].con_id = NULL; 1158 lookup->table[0].idx = 0; --- 592 unchanged lines hidden --- |