#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/interrupt.h>
+#include <linux/mod_devicetable.h>
#include <linux/module.h>
-#include <linux/of.h>
-#include <linux/of_platform.h>
+#include <linux/property.h>
+#include <linux/regmap.h>
+#include <linux/regulator/consumer.h>
+
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinconf-generic.h>
#include <linux/pinctrl/pinmux.h>
-#include <linux/regmap.h>
-#include <linux/regulator/consumer.h>
/* Fast access registers */
#define CY8C95X0_INPUT 0x00
.get_groups_count = cy8c95x0_pinctrl_get_groups_count,
.get_group_name = cy8c95x0_pinctrl_get_group_name,
.get_group_pins = cy8c95x0_pinctrl_get_group_pins,
+#ifdef CONFIG_OF
.dt_node_to_map = pinconf_generic_dt_node_to_map_pin,
.dt_free_map = pinconf_generic_dt_free_map,
+#endif
.pin_dbg_show = cy8c95x0_pin_dbg_show,
};
chip->dev = &client->dev;
/* Set the device type */
- if (client->dev.of_node)
- chip->driver_data = (unsigned long)of_device_get_match_data(&client->dev);
- else
+ chip->driver_data = (unsigned long)device_get_match_data(&client->dev);
+ if (!chip->driver_data)
chip->driver_data = i2c_match_id(cy8c95x0_id, client)->driver_data;
if (!chip->driver_data)