Commit 187a94c8 authored by Andrey Filippov's avatar Andrey Filippov

merged with master

parents 7d533e3a 1275e922
......@@ -181,6 +181,8 @@
elphel393_pwr,pinstrapped_oven= <1>;
elphel393_pwr,vcc_sens01_mv= <2800>; /* set sensor intreface voltage to 2.8V */
elphel393_pwr,channels_enable= "vp5";
/* high byte - enable bits, low byte - value */
elphel393_pwr,10389-init-value= <0x100>;
/* elphel393_pwr,channels_enable= "vcc_sens01 vp33sens01"; */
} ;
......
......@@ -181,6 +181,8 @@
elphel393_pwr,pinstrapped_oven= <1>;
elphel393_pwr,vcc_sens01_mv= <2800>; /* set sensor intreface voltage to 2.8V */
elphel393_pwr,channels_enable= "vp5";
/* high byte - enable bits, low byte - value */
elphel393_pwr,10389-init-value= <0x100>;
/* elphel393_pwr,channels_enable= "vcc_sens01 vp33sens01"; */
} ;
......
......@@ -181,6 +181,8 @@
elphel393_pwr,pinstrapped_oven= <1>;
elphel393_pwr,vcc_sens01_mv= <2800>; /* set sensor intreface voltage to 2.8V */
elphel393_pwr,channels_enable= "vp5";
/* high byte - enable bits, low byte - value */
elphel393_pwr,10389-init-value= <0x100>;
/* elphel393_pwr,channels_enable= "vcc_sens01 vp33sens01"; */
} ;
......
......@@ -1172,6 +1172,22 @@ static void elphel393_pwr_init_of(struct platform_device *pdev)
dev_info(&pdev->dev,"elphel393_pwr configuration done\n");
}
static void gpio_10389_initialize(struct platform_device *pdev){
const __be32 * config_data;
int len, init_value;
struct device_node *node = pdev->dev.of_node;
config_data = of_get_property(node, "elphel393_pwr,10389-init-value", &len);
if (config_data && (len>0)){
init_value = be32_to_cpup(&config_data[0]);
pr_debug("Found elphel393_pwr,10389-init-value=<%d>\n",init_value);
//reset for the gpios that are 1's on power on but 0's in the driver which cannot read them
gpio_10389_ctrl(&pdev->dev, (init_value & 0xf00) | 0xff);
gpio_10389_ctrl(&pdev->dev, init_value);
}
}
static int device_by_i2c_addr_match(struct device *dev, void *data)
{
struct i2c_client *client = to_i2c_client(dev);
......@@ -1306,13 +1322,9 @@ static int elphel393_pwr_probe(struct platform_device *pdev)
*/
pm_power_off = shutdown;
/*
if (base[2]!=NULL){
//turn off PCA9571
gpio_10389_ctrl(&pdev->dev, 0xf0f);
gpio_10389_ctrl(&pdev->dev, 0xf00);
gpio_10389_initialize(pdev);
}
*/
return 0;
}
......
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