Re: [PATCH v3] mfd: da9063: Support SMBus and I2C mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +	if (i2c_check_functionality(i2c->adapter, I2C_FUNC_I2C)) {
> +		dev_info(da9063->dev, "I2C mode");
> +		busmode = 0;
> +	} else {
> +		dev_info(da9063->dev, "SMBus mode");
> +		busmode = DA9063_TWOWIRE_TO;
> +	}

In principle, this looks good and is sane to do. I'd just suggest to
leave out the dev_info calls and maybe just do:

	busmode = i2c_check_functionality(i2c->adapter, I2C_FUNC_I2C) ?
		  0 : DA9063_TWOWIRE_TO;

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux