regulators_node = dev_read_subnode(dev, "regulators");
if (!ofnode_valid(regulators_node)) {
- debug("%s: %s regulators subnode not found!", __func__,
+ debug("%s: %s regulators subnode not found!\n", __func__,
dev->name);
return -ENXIO;
}
ret = pmic_reg_read(dev, AS3722_ASIC_ID1);
if (ret < 0) {
- pr_err("failed to read ID1 register: %d", ret);
+ pr_err("failed to read ID1 register: %d\n", ret);
return ret;
}
*idp = ret;
ret = pmic_reg_read(dev, AS3722_ASIC_ID2);
if (ret < 0) {
- pr_err("failed to read ID2 register: %d", ret);
+ pr_err("failed to read ID2 register: %d\n", ret);
return ret;
}
*revisionp = ret;
ret = pmic_reg_write(dev, AS3722_SD_VOLTAGE(sd), value);
if (ret < 0) {
- pr_err("failed to write SD%u voltage register: %d", sd, ret);
+ pr_err("failed to write SD%u voltage register: %d\n", sd, ret);
return ret;
}
ret = pmic_reg_write(dev, AS3722_LDO_VOLTAGE(ldo), value);
if (ret < 0) {
- pr_err("failed to write LDO%u voltage register: %d", ldo,
- ret);
+ pr_err("failed to write LDO%u voltage register: %d\n", ldo,
+ ret);
return ret;
}
ret = as3722_read_id(dev, &id, &revision);
if (ret < 0) {
- pr_err("failed to read ID: %d", ret);
+ pr_err("failed to read ID: %d\n", ret);
return ret;
}
if (id != AS3722_DEVICE_ID) {
- pr_err("unknown device");
+ pr_err("unknown device\n");
return -ENOENT;
}
err = pmic_reg_write(pmic, AS3722_GPIO_CONTROL(gpio), value);
if (err) {
- pr_err("failed to configure GPIO#%u: %d", gpio, err);
+ pr_err("failed to configure GPIO#%u: %d\n", gpio, err);
return err;
}
err = pmic_reg_read(pmic, AS3722_GPIO_SIGNAL_OUT);
if (err < 0) {
- pr_err("failed to read GPIO signal out register: %d", err);
+ pr_err("failed to read GPIO signal out register: %d\n", err);
return err;
}
value = err;
err = pmic_reg_write(pmic, AS3722_GPIO_SIGNAL_OUT, value);
if (err) {
- pr_err("failed to set GPIO#%u %s: %d", gpio, l, err);
+ pr_err("failed to set GPIO#%u %s: %d\n", gpio, l, err);
return err;
}
err = pmic_reg_write(pmic, AS3722_GPIO_CONTROL(gpio), value);
if (err) {
- pr_err("failed to configure GPIO#%u as output: %d", gpio, err);
+ pr_err("failed to configure GPIO#%u as output: %d\n", gpio,
+ err);
return err;
}
err = as3722_gpio_set_value(pmic, gpio, value);
if (err < 0) {
- pr_err("failed to set GPIO#%u high: %d", gpio, err);
+ pr_err("failed to set GPIO#%u high: %d\n", gpio, err);
return err;
}
int len)
{
if (dm_i2c_write(dev, reg, buff, len)) {
- pr_err("write error to device: %p register: %#x!", dev, reg);
+ pr_err("write error to device: %p register: %#x!\n", dev, reg);
return -EIO;
}
static int lp873x_read(struct udevice *dev, uint reg, uint8_t *buff, int len)
{
if (dm_i2c_read(dev, reg, buff, len)) {
- pr_err("read error from device: %p register: %#x!", dev, reg);
+ pr_err("read error from device: %p register: %#x!\n", dev, reg);
return -EIO;
}
regulators_node = dev_read_subnode(dev, "regulators");
if (!ofnode_valid(regulators_node)) {
- debug("%s: %s regulators subnode not found!", __func__,
+ debug("%s: %s regulators subnode not found!\n", __func__,
dev->name);
return -ENXIO;
}
ret = dm_i2c_write(dev, reg, buff, len);
if (ret)
- pr_err("write error to device: %p register: %#x!", dev, reg);
+ pr_err("write error to device: %p register: %#x!\n", dev, reg);
return ret;
}
ret = dm_i2c_read(dev, reg, buff, len);
if (ret)
- pr_err("read error from device: %p register: %#x!", dev, reg);
+ pr_err("read error from device: %p register: %#x!\n", dev, reg);
return ret;
}
regulators_node = dev_read_subnode(dev, "regulators");
if (!ofnode_valid(regulators_node)) {
- debug("%s: %s regulators subnode not found!", __func__,
+ debug("%s: %s regulators subnode not found!\n", __func__,
dev->name);
return -ENXIO;
}
int len)
{
if (dm_i2c_write(dev, reg, buff, len)) {
- pr_err("write error to device: %p register: %#x!", dev, reg);
+ pr_err("write error to device: %p register: %#x!\n", dev, reg);
return -EIO;
}
static int max77686_read(struct udevice *dev, uint reg, uint8_t *buff, int len)
{
if (dm_i2c_read(dev, reg, buff, len)) {
- pr_err("read error from device: %p register: %#x!", dev, reg);
+ pr_err("read error from device: %p register: %#x!\n", dev, reg);
return -EIO;
}
regulators_node = dev_read_subnode(dev, "voltage-regulators");
if (!ofnode_valid(regulators_node)) {
- debug("%s: %s regulators subnode not found!", __func__,
- dev->name);
+ debug("%s: %s regulators subnode not found!\n", __func__,
+ dev->name);
return -ENXIO;
}
ret = dm_i2c_write(dev, reg, buff, len);
if (ret)
- pr_err("write error to device: %p register: %#x!", dev, reg);
+ pr_err("write error to device: %p register: %#x!\n", dev, reg);
return ret;
}
ret = dm_i2c_read(dev, reg, buff, len);
if (ret)
- pr_err("read error from device: %p register: %#x!", dev, reg);
+ pr_err("read error from device: %p register: %#x!\n", dev, reg);
return ret;
}
ret = dm_i2c_write(dev, reg, buff, len);
if (ret)
- pr_err("write error to device: %p register: %#x!", dev, reg);
+ pr_err("write error to device: %p register: %#x!\n", dev, reg);
return ret;
}
ret = dm_i2c_read(dev, reg, buff, len);
if (ret)
- pr_err("read error from device: %p register: %#x!", dev, reg);
+ pr_err("read error from device: %p register: %#x!\n", dev, reg);
return ret;
}
ret = dm_i2c_write(dev, reg, buf, len);
if (ret)
- printf("write error to device: %p register: %#x!", dev, reg);
+ printf("write error to device: %p register: %#x!\n", dev, reg);
return ret;
}
ret = dm_i2c_read(dev, reg, buf, len);
if (ret)
- printf("read error from device: %p register: %#x!", dev, reg);
+ printf("read error from device: %p register: %#x!\n", dev, reg);
buff[0] = buf[2];
buff[1] = buf[1];
int len)
{
if (dm_i2c_write(dev, reg, buff, len)) {
- pr_err("write error to device: %p register: %#x!", dev, reg);
+ pr_err("write error to device: %p register: %#x!\n", dev, reg);
return -EIO;
}
static int palmas_read(struct udevice *dev, uint reg, uint8_t *buff, int len)
{
if (dm_i2c_read(dev, reg, buff, len)) {
- pr_err("read error from device: %p register: %#x!", dev, reg);
+ pr_err("read error from device: %p register: %#x!\n", dev, reg);
return -EIO;
}
}
if (!ofnode_valid(pmic_node)) {
- debug("%s: %s pmic subnode not found!", __func__, dev->name);
+ debug("%s: %s pmic subnode not found!\n", __func__, dev->name);
return -ENXIO;
}
regulators_node = ofnode_find_subnode(pmic_node, "regulators");
if (!ofnode_valid(regulators_node)) {
- debug("%s: %s reg subnode not found!", __func__, dev->name);
+ debug("%s: %s reg subnode not found!\n", __func__, dev->name);
return -ENXIO;
}
int len)
{
if (dm_i2c_write(dev, reg, buff, len)) {
- pr_err("write error to device: %p register: %#x!", dev, reg);
+ pr_err("write error to device: %p register: %#x!\n", dev, reg);
return -EIO;
}
static int pfuze100_read(struct udevice *dev, uint reg, uint8_t *buff, int len)
{
if (dm_i2c_read(dev, reg, buff, len)) {
- pr_err("read error from device: %p register: %#x!", dev, reg);
+ pr_err("read error from device: %p register: %#x!\n", dev, reg);
return -EIO;
}
regulators_node = dev_read_subnode(dev, "regulators");
if (!ofnode_valid(regulators_node)) {
- debug("%s: %s regulators subnode not found!", __func__,
+ debug("%s: %s regulators subnode not found!\n", __func__,
dev->name);
return -ENXIO;
}
ret = dm_i2c_write(dev, reg, buff, len);
if (ret) {
- debug("write error to device: %p register: %#x!", dev, reg);
+ debug("write error to device: %p register: %#x!\n", dev, reg);
return ret;
}
ret = dm_i2c_read(dev, reg, buff, len);
if (ret) {
- debug("read error from device: %p register: %#x!", dev, reg);
+ debug("read error from device: %p register: %#x!\n", dev, reg);
return ret;
}
regulators_node = dev_read_subnode(dev, "regulators");
if (!ofnode_valid(regulators_node)) {
- debug("%s: %s regulators subnode not found!", __func__,
+ debug("%s: %s regulators subnode not found!\n", __func__,
dev->name);
return -ENXIO;
}
ret = dm_i2c_write(dev, reg, buff, len);
if (ret) {
- debug("write error to device: %p register: %#x!", dev, reg);
+ debug("write error to device: %p register: %#x!\n", dev, reg);
return ret;
}
ret = dm_i2c_read(dev, reg, buff, len);
if (ret) {
- debug("read error from device: %p register: %#x!", dev, reg);
+ debug("read error from device: %p register: %#x!\n", dev, reg);
return ret;
}
ret = dm_i2c_write(dev, reg, buff, len);
if (ret)
- pr_err("write error to device: %p register: %#x!", dev, reg);
+ pr_err("write error to device: %p register: %#x!\n", dev, reg);
return ret;
}
ret = dm_i2c_read(dev, reg, buff, len);
if (ret)
- pr_err("read error from device: %p register: %#x!", dev, reg);
+ pr_err("read error from device: %p register: %#x!\n", dev, reg);
return ret;
}
regulators_node = dev_read_subnode(dev, "voltage-regulators");
if (!ofnode_valid(regulators_node)) {
- debug("%s: %s regulators subnode not found!", __func__,
- dev->name);
+ debug("%s: %s regulators subnode not found!\n", __func__,
+ dev->name);
return -ENXIO;
}
int len)
{
if (dm_i2c_write(dev, reg, buff, len)) {
- pr_err("write error to device: %p register: %#x!", dev, reg);
+ pr_err("write error to device: %p register: %#x!\n", dev, reg);
return -EIO;
}
static int s5m8767_read(struct udevice *dev, uint reg, uint8_t *buff, int len)
{
if (dm_i2c_read(dev, reg, buff, len)) {
- pr_err("read error from device: %p register: %#x!", dev, reg);
+ pr_err("read error from device: %p register: %#x!\n", dev, reg);
return -EIO;
}
node = dev_read_subnode(dev, "regulators");
if (!ofnode_valid(node)) {
- debug("%s: %s regulators subnode not found!", __func__,
+ debug("%s: %s regulators subnode not found!\n", __func__,
dev->name);
return -ENXIO;
}
const uint8_t *buff, int len)
{
if (dm_i2c_write(dev, reg, buff, len)) {
- pr_err("write error to device: %p register: %#x!", dev, reg);
+ pr_err("write error to device: %p register: %#x!\n", dev, reg);
return -EIO;
}
uint8_t *buff, int len)
{
if (dm_i2c_read(dev, reg, buff, len)) {
- pr_err("read error from device: %p register: %#x!", dev, reg);
+ pr_err("read error from device: %p register: %#x!\n", dev, reg);
return -EIO;
}
regulators_node = dev_read_subnode(dev, "regulators");
if (!ofnode_valid(regulators_node)) {
- dev_dbg(dev, "regulators subnode not found!");
+ dev_dbg(dev, "regulators subnode not found!\n");
return -ENXIO;
}
dev_dbg(dev, "found regulators subnode\n");
int len)
{
if (dm_i2c_write(dev, reg, buff, len)) {
- pr_err("write error to device: %p register: %#x!", dev, reg);
+ pr_err("write error to device: %p register: %#x!\n", dev, reg);
return -EIO;
}
ret = dm_i2c_read(dev, reg, buff, len);
if (ret) {
- pr_err("read error %d from device: %p register: %#x!", ret, dev,
- reg);
+ pr_err("read error %d from device: %p register: %#x!\n", ret,
+ dev, reg);
return -EIO;
}
regulators_node = dev_read_subnode(dev, "regulators");
if (!ofnode_valid(regulators_node)) {
- debug("%s: %s regulators subnode not found!", __func__,
+ debug("%s: %s regulators subnode not found!\n", __func__,
dev->name);
return -ENXIO;
}