Skip to content
Snippets Groups Projects
Commit 3fc6ec75 authored by Nano's avatar Nano
Browse files

replace delay with sleep per kernel doc recomendations

parent e039cad3
No related branches found
No related tags found
No related merge requests found
...@@ -55,10 +55,11 @@ static struct power_supply_desc bat_desc = { ...@@ -55,10 +55,11 @@ static struct power_supply_desc bat_desc = {
.type = POWER_SUPPLY_TYPE_BATTERY, .type = POWER_SUPPLY_TYPE_BATTERY,
}; };
static struct power_supply_config psy_cfg = {};
static int lpcProbe(struct spi_device *spi) static int lpcProbe(struct spi_device *spi)
{ {
struct lpc_driver_data *data; struct lpc_driver_data *data;
struct power_supply_config psy_cfg = {};
int ret; int ret;
printk(KERN_INFO "%s: probing ...\n", "reform2-lpc"); printk(KERN_INFO "%s: probing ...\n", "reform2-lpc");
...@@ -274,16 +275,14 @@ static ssize_t lpcCommand(struct device *dev, char command, uint8_t arg1, uint8_ ...@@ -274,16 +275,14 @@ static ssize_t lpcCommand(struct device *dev, char command, uint8_t arg1, uint8_
{ {
printk(KERN_INFO "%s: spi_write failed\n", __func__); printk(KERN_INFO "%s: spi_write failed\n", __func__);
} }
// todo, replace with wait timer? msleep(50);
mdelay(70);
ret = spi_read(data->spi, responseBuffer, 8); ret = spi_read(data->spi, responseBuffer, 8);
if (ret) if (ret)
{ {
printk(KERN_INFO "%s: spi_read failed\n", __func__); printk(KERN_INFO "%s: spi_read failed\n", __func__);
} }
// todo, replace with wait timer? msleep(50);
mdelay(70);
mutex_unlock(&data->lock); mutex_unlock(&data->lock);
return ret; return ret;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment