BigW Consortium Gitlab

Commit c8d6640a by David Frey

Cleanup formatting in mangOH yellow driver

parent 01f2028e
......@@ -73,7 +73,7 @@ static struct mangoh_yellow_platform_data {
} mangoh_yellow_pdata;
static struct mangoh_yellow_driver_data {
// struct i2c_client* eeprom;
/* struct i2c_client* eeprom; */
struct i2c_client* i2c_switch;
struct i2c_client* imu;
struct i2c_client* environmental;
......@@ -163,19 +163,26 @@ static struct platform_device mangoh_yellow_expander = {
/*
* The EEPROM is marked as read-only to prevent accidental writes. The mangOH
* Yellow has the write protect (WP) pin pulled high which has the effect of making
* the upper 1/4 of the address space of the EEPROM write protected by hardware.
* Yellow has the write protect (WP) pin pulled high which has the effect of
* making the upper 1/4 of the address space of the EEPROM write protected by
* hardware.
*/
/*static struct at24_platform_data mangoh_yellow_eeprom_data = {
/*
* The EEPROM is commented out because it's not populated on mangOH Yellow DV2
* hardware, but it is expected to return in later revisions.
*/
/*
static struct at24_platform_data mangoh_yellow_eeprom_data = {
.byte_len = 4096,
.page_size = 32,
.flags = (AT24_FLAG_ADDR16 | AT24_FLAG_READONLY),
};*/
/*static struct i2c_board_info mangoh_yellow_eeprom_info = {
};
static struct i2c_board_info mangoh_yellow_eeprom_info = {
I2C_BOARD_INFO("at24", 0x50),
.platform_data = &mangoh_yellow_eeprom_data,
};
*/
static void mangoh_yellow_release(struct device* dev)
{
/* Nothing alloc'd, so nothign to free */
......@@ -268,11 +275,11 @@ static int mangoh_yellow_probe(struct platform_device* pdev)
}
mangoh_yellow_driver_data.expander_registered = true;
/* Map the I2C BME680 environmental sensor for gas/humidity/temp/pressure sensor */
dev_info(&pdev->dev, "mapping bme680 gas/temperature/pressure sensor\n");
mangoh_yellow_driver_data.environmental =
i2c_new_device(i2c_adapter_port1,
&mangoh_yellow_environmental_devinfo);
/* Map the BME680 environmental sensor (gas/humidity/temp/pressure) */
dev_info(&pdev->dev,
"mapping bme680 gas/humidity/temperature/pressure sensor\n");
mangoh_yellow_driver_data.environmental = i2c_new_device(
i2c_adapter_port1, &mangoh_yellow_environmental_devinfo);
if (!mangoh_yellow_driver_data.environmental) {
dev_err(&pdev->dev,
"Failed to register environmental sensor %s\n",
......@@ -380,7 +387,7 @@ static int mangoh_yellow_remove(struct platform_device* pdev)
platform_device_unregister(&mangoh_yellow_expander);
i2c_unregister_device(dd->gpio_expander);
i2c_unregister_device(dd->i2c_switch);
// i2c_unregister_device(dd->eeprom);
/* i2c_unregister_device(dd->eeprom); */
return 0;
}
......@@ -389,6 +396,7 @@ static void mangoh_yellow_expander_release(struct device *dev)
{
/* do nothing */
}
static int __init mangoh_yellow_init(void)
{
platform_driver_register(&mangoh_yellow_driver);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment