On Mon, Jan 28, 2019 at 6:50 AM Bastien Nocera <hadess@xxxxxxxxxx> wrote: > > On Sun, 2019-01-27 at 22:04 -0600, Daniel J. Ogorchock wrote: > > + case POWER_SUPPLY_PROP_STATUS: > > See my reply to the cover letter for what API to implement here to > advertise the coarse battery level. > > > + if (charging) > > + val->intval = POWER_SUPPLY_STATUS_CHARGING; > > + else if (capacity == 100 && powered) > > + val->intval = POWER_SUPPLY_STATUS_FULL; > > If full is full, you don't need the "&& powered" condition, do you? I was trying to be consistent with hid-sony's behavior. It checks if the controller's cable is plugged in in order to set it to STATUS_FULL.