Re: [PATCH] sbs-battery: add option to always register battery

From: Sebastian Reichel
Date: Wed Jun 03 2015 - 18:51:23 EST


Hi,

On Wed, Jun 03, 2015 at 04:10:35PM +0200, Frans Klaver wrote:
> > While I still think, that the HW design is bad,
>
> I'm still interested in learning how we could improve the HW design in
> your opinion. Would you say we should be using a non-removable battery?

No I would say the battery should be able to identifiy itself. So if
the device is not connected, there is no battery device and when you
connect it the battery is registered. This could be done for example
using Device Tree overlays. iirc something like that is planned for
beagle bone capes.

> > I'm basically fine
> > with this change based upon your comments. I think it's better to
> > make this into a module parameter, though, since that moves the
> > decision about this feature from compilation time to module load
> > time. This will make it possible to use a generic kernel on your
> > device. Maybe something like this could be used:
> >
> > module_param(force_load, bool, 0444);
> > MODULE_PARM_DESC(force_load,
> > "Attempts to load the driver even if the "
> > "battery is not connected");
>
> That makes sense. We can work with that.

-- Sebastian

Attachment: signature.asc
Description: Digital signature