Wolfram Sang wrote:
> > > wonder even more if we couldn't supply num_adapters to i2c_mux_alloc()
> > > and reserve the memory statically. i2c busses are not
> > > dynamic/hot-pluggable so that should be good enough?
> >
> > Yes, that would work, but it would take some restructuring in some of
> >
> > I'd suggest to rename 'adapters' into 'num_adapters' throughout this
> > patch. I think it makes the code a lot easier to understand.
>
> Hmm, you mean just the variable names, right? And not function names
> such as i2c_mux_reserve_(num_)adapters?
Yes, only variable names.
> > Despite that
Hi!
On 2016-04-11 22:46, Wolfram Sang wrote:
> Hi Peter,
>
> first high-level review:
>
>> +int i2c_mux_reserve_adapters(struct i2c_mux_core *muxc, int adapters)
>
> I'd suggest to rename 'adapters' into 'num_adapters' throughout this
> patch. I think it makes the code a lot easier to understan
Hi Peter,
first high-level review:
> +int i2c_mux_reserve_adapters(struct i2c_mux_core *muxc, int adapters)
I'd suggest to rename 'adapters' into 'num_adapters' throughout this
patch. I think it makes the code a lot easier to understand.
> +{
> + struct i2c_adapter **adapter;
> +
> + if
From: Peter Rosin
All i2c-muxes have a parent adapter and one or many child
adapters. A mux also has some means of selection. Previously,
this was stored per child adapter, but it is only needed
to keep track of this per mux.
Add an i2c mux core, that keeps track of this consistently.
Also add
5 matches
Mail list logo