On Sat, Jan 20, 2024 at 10:27 PM Duje Mihanović <[email protected]> wrote:
> The ExpressWire protocol is shared between at least KTD2692 and KTD2801 > with slight differences such as timings and the former not having a > defined set of pulses for enabling the protocol (possibly because it > does not support PWM unlike KTD2801). Despite these differences the > ExpressWire handling code can be shared between the two, so move it into > a library in preparation for adding KTD2801 support. > > Suggested-by: Daniel Thompson <[email protected]> > Signed-off-by: Duje Mihanović <[email protected]> This is great stuff. I looked at my KTD253 driver but AFAICT it uses a different method: instead of transferring a numeral, it increases/decreases a counter, so it can't use the library. > +extern void expresswire_power_off(struct expresswire_common_props *props); > +extern void expresswire_enable(struct expresswire_common_props *props); > +extern void expresswire_start(struct expresswire_common_props *props); > +extern void expresswire_end(struct expresswire_common_props *props); > +extern void expresswire_set_bit(struct expresswire_common_props *props, bool > bit); I would skip the keyword "extern" since it is default I think even checkpatch complains about it these days? Anyway, no big deal: Reviewed-by: Linus Walleij <[email protected]> Yours, Linus Walleij
