mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 16:29:59 +00:00
mtd: nand-gpio: Do not override GPIOs if driver uses platform_data but OF is enabled in kernel config
Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
parent
c85d32d568
commit
ee4f36663b
1 changed files with 3 additions and 0 deletions
|
@ -151,6 +151,9 @@ static int gpio_nand_get_config_of(const struct device *dev,
|
|||
{
|
||||
u32 val;
|
||||
|
||||
if (!dev->of_node)
|
||||
return -ENODEV;
|
||||
|
||||
if (!of_property_read_u32(dev->of_node, "bank-width", &val)) {
|
||||
if (val == 2) {
|
||||
plat->options |= NAND_BUSWIDTH_16;
|
||||
|
|
Loading…
Reference in a new issue