i2c: implement remaining required driver logic
This commit is contained in:
@@ -22,7 +22,7 @@ namespace ams::boot {
|
||||
i2c::driver::I2cSession i2c_session;
|
||||
public:
|
||||
BatteryDriver() {
|
||||
i2c::driver::OpenSession(std::addressof(this->i2c_session), i2c::DeviceCode_Max17050);
|
||||
R_ABORT_UNLESS(i2c::driver::OpenSession(std::addressof(this->i2c_session), i2c::DeviceCode_Max17050));
|
||||
}
|
||||
|
||||
~BatteryDriver() {
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace ams::boot {
|
||||
i2c::driver::I2cSession i2c_session;
|
||||
public:
|
||||
ChargerDriver() {
|
||||
i2c::driver::OpenSession(std::addressof(this->i2c_session), i2c::DeviceCode_Bq24193);
|
||||
R_ABORT_UNLESS(i2c::driver::OpenSession(std::addressof(this->i2c_session), i2c::DeviceCode_Bq24193));
|
||||
|
||||
//boot::gpio::Configure(GpioPadName_Bq24193Charger);
|
||||
//boot::gpio::SetDirection(GpioPadName_Bq24193Charger, GpioDirection_Output);
|
||||
|
||||
@@ -197,7 +197,7 @@ namespace ams::boot {
|
||||
/* Turn on DSI/voltage rail. */
|
||||
{
|
||||
i2c::driver::I2cSession i2c_session;
|
||||
i2c::driver::OpenSession(std::addressof(i2c_session), i2c::DeviceCode_Max77620Pmic);
|
||||
R_ABORT_UNLESS(i2c::driver::OpenSession(std::addressof(i2c_session), i2c::DeviceCode_Max77620Pmic));
|
||||
|
||||
if (g_soc_type == spl::SocType_Mariko) {
|
||||
WriteI2cRegister(i2c_session, 0x18, 0x3A);
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace ams::boot {
|
||||
i2c::driver::I2cSession i2c_session;
|
||||
public:
|
||||
PmicDriver() {
|
||||
i2c::driver::OpenSession(std::addressof(this->i2c_session), i2c::DeviceCode_Max77620Pmic);
|
||||
R_ABORT_UNLESS(i2c::driver::OpenSession(std::addressof(this->i2c_session), i2c::DeviceCode_Max77620Pmic));
|
||||
}
|
||||
|
||||
~PmicDriver() {
|
||||
|
||||
Reference in New Issue
Block a user