|
@@ -686,3 +686,27 @@ static int da850_evm_bb_expander_setup(struct i2c_client *client,
|
|
|
/*
|
|
|
* Register the switches and pushbutton on the baseboard as a gpio-keys
|
|
|
* device.
|
|
|
+ */
|
|
|
+ da850_evm_bb_keys_init(gpio);
|
|
|
+ ret = platform_device_register(&da850_evm_bb_keys_device);
|
|
|
+ if (ret) {
|
|
|
+ pr_warning("Could not register baseboard GPIO expander keys");
|
|
|
+ goto io_exp_setup_sw_fail;
|
|
|
+ }
|
|
|
+
|
|
|
+ da850_evm_bb_leds_init(gpio);
|
|
|
+ ret = platform_device_register(&da850_evm_bb_leds_device);
|
|
|
+ if (ret) {
|
|
|
+ pr_warning("Could not register baseboard GPIO expander LEDS");
|
|
|
+ goto io_exp_setup_leds_fail;
|
|
|
+ }
|
|
|
+
|
|
|
+ return 0;
|
|
|
+
|
|
|
+io_exp_setup_leds_fail:
|
|
|
+ platform_device_unregister(&da850_evm_bb_keys_device);
|
|
|
+io_exp_setup_sw_fail:
|
|
|
+ return ret;
|
|
|
+}
|
|
|
+
|
|
|
+static int da850_evm_bb_expander_teardown(struct i2c_client *client,
|