|
@@ -119,3 +119,102 @@ static int lis302_release(void)
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+static struct lis3lv02d_platform_data rx51_lis3lv02d_data = {
|
|
|
|
+ .click_flags = LIS3_CLICK_SINGLE_X | LIS3_CLICK_SINGLE_Y |
|
|
|
|
+ LIS3_CLICK_SINGLE_Z,
|
|
|
|
+ /* Limits are 0.5g * value */
|
|
|
|
+ .click_thresh_x = 8,
|
|
|
|
+ .click_thresh_y = 8,
|
|
|
|
+ .click_thresh_z = 10,
|
|
|
|
+ /* Click must be longer than time limit */
|
|
|
|
+ .click_time_limit = 9,
|
|
|
|
+ /* Kind of debounce filter */
|
|
|
|
+ .click_latency = 50,
|
|
|
|
+
|
|
|
|
+ /* Limits for all axis. millig-value / 18 to get HW values */
|
|
|
|
+ .wakeup_flags = LIS3_WAKEUP_X_HI | LIS3_WAKEUP_Y_HI,
|
|
|
|
+ .wakeup_thresh = 800 / 18,
|
|
|
|
+ .wakeup_flags2 = LIS3_WAKEUP_Z_HI ,
|
|
|
|
+ .wakeup_thresh2 = 900 / 18,
|
|
|
|
+
|
|
|
|
+ .hipass_ctrl = LIS3_HIPASS1_DISABLE | LIS3_HIPASS2_DISABLE,
|
|
|
|
+
|
|
|
|
+ /* Interrupt line 2 for click detection, line 1 for thresholds */
|
|
|
|
+ .irq_cfg = LIS3_IRQ2_CLICK | LIS3_IRQ1_FF_WU_12,
|
|
|
|
+
|
|
|
|
+ .axis_x = LIS3_DEV_X,
|
|
|
|
+ .axis_y = LIS3_INV_DEV_Y,
|
|
|
|
+ .axis_z = LIS3_INV_DEV_Z,
|
|
|
|
+ .setup_resources = lis302_setup,
|
|
|
|
+ .release_resources = lis302_release,
|
|
|
|
+ .st_min_limits = {-32, 3, 3},
|
|
|
|
+ .st_max_limits = {-3, 32, 32},
|
|
|
|
+};
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+#if defined(CONFIG_SENSORS_TSL2563) || defined(CONFIG_SENSORS_TSL2563_MODULE)
|
|
|
|
+static struct tsl2563_platform_data rx51_tsl2563_platform_data = {
|
|
|
|
+ .cover_comp_gain = 16,
|
|
|
|
+};
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+#if defined(CONFIG_LEDS_LP5523) || defined(CONFIG_LEDS_LP5523_MODULE)
|
|
|
|
+static struct lp5523_led_config rx51_lp5523_led_config[] = {
|
|
|
|
+ {
|
|
|
|
+ .chan_nr = 0,
|
|
|
|
+ .led_current = 50,
|
|
|
|
+ }, {
|
|
|
|
+ .chan_nr = 1,
|
|
|
|
+ .led_current = 50,
|
|
|
|
+ }, {
|
|
|
|
+ .chan_nr = 2,
|
|
|
|
+ .led_current = 50,
|
|
|
|
+ }, {
|
|
|
|
+ .chan_nr = 3,
|
|
|
|
+ .led_current = 50,
|
|
|
|
+ }, {
|
|
|
|
+ .chan_nr = 4,
|
|
|
|
+ .led_current = 50,
|
|
|
|
+ }, {
|
|
|
|
+ .chan_nr = 5,
|
|
|
|
+ .led_current = 50,
|
|
|
|
+ }, {
|
|
|
|
+ .chan_nr = 6,
|
|
|
|
+ .led_current = 50,
|
|
|
|
+ }, {
|
|
|
|
+ .chan_nr = 7,
|
|
|
|
+ .led_current = 50,
|
|
|
|
+ }, {
|
|
|
|
+ .chan_nr = 8,
|
|
|
|
+ .led_current = 50,
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static int rx51_lp5523_setup(void)
|
|
|
|
+{
|
|
|
|
+ return gpio_request_one(RX51_LP5523_CHIP_EN_GPIO, GPIOF_DIR_OUT,
|
|
|
|
+ "lp5523_enable");
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static void rx51_lp5523_release(void)
|
|
|
|
+{
|
|
|
|
+ gpio_free(RX51_LP5523_CHIP_EN_GPIO);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static void rx51_lp5523_enable(bool state)
|
|
|
|
+{
|
|
|
|
+ gpio_set_value(RX51_LP5523_CHIP_EN_GPIO, !!state);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static struct lp5523_platform_data rx51_lp5523_platform_data = {
|
|
|
|
+ .led_config = rx51_lp5523_led_config,
|
|
|
|
+ .num_channels = ARRAY_SIZE(rx51_lp5523_led_config),
|
|
|
|
+ .clock_mode = LP5523_CLOCK_AUTO,
|
|
|
|
+ .setup_resources = rx51_lp5523_setup,
|
|
|
|
+ .release_resources = rx51_lp5523_release,
|
|
|
|
+ .enable = rx51_lp5523_enable,
|
|
|
|
+};
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+static struct omap2_mcspi_device_config wl1251_mcspi_config = {
|