Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable the emc2305 fan controller and NCP power controller 30ms timeo… #8138

Merged
merged 1 commit into from
Aug 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,18 @@ start)
sleep 0.1
done

/bin/sh /usr/local/bin/platform_api_mgnt.sh init
bus_en=8
sleep 1
cfg_r=`i2cget -y -f 8 0x60 0xD1`
((cfg_w=$cfg_r+$bus_en))
i2cset -y -f 8 0x60 0xD1 $cfg_w
sleep 1
cfg_r=`i2cget -y -f 9 0x20 0xD1`
((cfg_w=$cfg_r+$bus_en))
i2cset -y -f 9 0x20 0xD1 $cfg_w
sleep 1

/bin/sh /usr/local/bin/platform_api_mgnt.sh init

echo "done."
;;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,7 @@ emc2305_probe(struct i2c_client *client, const struct i2c_device_id *id)
int status;
int i;
int fan_idx;
unsigned char dis_to = 0;

if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
return -EIO;
Expand All @@ -752,6 +753,11 @@ emc2305_probe(struct i2c_client *client, const struct i2c_device_id *id)

i2c_set_clientdata(client, data);
mutex_init(&data->update_lock);

dis_to = i2c_smbus_read_byte_data(client, REG_CONFIGURATION);
dis_to &= 0xBF;
/* The SMBus timeout function is enabled */
(void)i2c_smbus_write_byte_data(client, REG_CONFIGURATION, dis_to);

status = i2c_smbus_read_byte_data(client, REG_PRODUCT_ID);
switch (status) {
Expand Down