In more recent versions of the Linux kernel the driver's probe function
returns an error if the "pinctrl-single,register-width" DT property is
missing. The lack of this information, in fact, does not allow to know
whether to access the registers of the controller at 8, 16, ... bits.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Reviewed-by: Simon Glass <sjg@chromium.org>
fdt_addr_t base;
int offset;
u32 mask;
- int width;
+ u32 width;
bool bits_per_mux;
};
fdt_addr_t addr;
fdt_size_t size;
struct single_pdata *pdata = dev_get_plat(dev);
+ int ret;
- pdata->width =
- dev_read_u32_default(dev, "pinctrl-single,register-width", 0);
+ ret = dev_read_u32(dev, "pinctrl-single,register-width", &pdata->width);
+ if (ret) {
+ dev_err(dev, "missing register width\n");
+ return ret;
+ }
addr = dev_read_addr_size(dev, "reg", &size);
if (addr == FDT_ADDR_T_NONE) {