ad525x_dpot.c (bf61c8840efe60fd8f91446860b63338fb424158) | ad525x_dpot.c (f7b41276b6b07f47c5f5212fa244385b0e3aaa30) |
---|---|
1/* 2 * ad525x_dpot: Driver for the Analog Devices digital potentiometers 3 * Copyright (c) 2009-2010 Analog Devices, Inc. 4 * Author: Michael Hennerich <hennerich@blackfin.uclinux.org> 5 * 6 * DEVID #Wipers #Positions Resistor Options (kOhm) 7 * AD5258 1 64 1, 10, 50, 100 8 * AD5259 1 256 5, 10, 50, 100 --- 456 unchanged lines hidden (view full) --- 465 466 return count; 467 } 468 469 if ((reg & DPOT_ADDR_OTP) && 470 !test_bit(DPOT_RDAC_MASK & reg, data->otp_en_mask)) 471 return -EPERM; 472 | 1/* 2 * ad525x_dpot: Driver for the Analog Devices digital potentiometers 3 * Copyright (c) 2009-2010 Analog Devices, Inc. 4 * Author: Michael Hennerich <hennerich@blackfin.uclinux.org> 5 * 6 * DEVID #Wipers #Positions Resistor Options (kOhm) 7 * AD5258 1 64 1, 10, 50, 100 8 * AD5259 1 256 5, 10, 50, 100 --- 456 unchanged lines hidden (view full) --- 465 466 return count; 467 } 468 469 if ((reg & DPOT_ADDR_OTP) && 470 !test_bit(DPOT_RDAC_MASK & reg, data->otp_en_mask)) 471 return -EPERM; 472 |
473 err = strict_strtoul(buf, 10, &value); | 473 err = kstrtoul(buf, 10, &value); |
474 if (err) 475 return err; 476 477 if (value > data->rdac_mask) 478 value = data->rdac_mask; 479 480 mutex_lock(&data->update_lock); 481 dpot_write(data, reg, value); --- 290 unchanged lines hidden --- | 474 if (err) 475 return err; 476 477 if (value > data->rdac_mask) 478 value = data->rdac_mask; 479 480 mutex_lock(&data->update_lock); 481 dpot_write(data, reg, value); --- 290 unchanged lines hidden --- |