Subject: Re: RFC: Alchemy Au1550 SMBus driver on PSC
To: Garrett D'Amore <garrett_damore@tadpole.com>
From: Shigeyuki Fukushima <shige@netbsd.org>
List: port-evbmips
Date: 03/04/2006 00:31:14
Garrett D'Amore wrote:
> This looks pretty good.
Thanks.
> Only one question: in aupsc_enable(), why do you bother to complain if
> it is already enabled? I think this should be one of two things:
>
> 1) if it is a programmer error, then make it a KASSERT()
>
> 2) if there is some reason why its not programmer error, then you should
> probably just do the disable() yourself, and maybe put a message in an
> #ifdef DIAGNOSTIC or somesuch.
I assume 2).
This is my assumption:
Maybe board-providers can connect i2c devices and spi devices
to same psc device.
But, we cannot use two or more protocols on a psc device
at the same time.
When we may need switching protocol on a psc device,
we may need to check already-enabled status on this device.
If this assumption is wrong
(for example, when we can only one (fixed) protocol on a psc device),
we need to reconsider a concept of implementing this driver,
and to detect kernel configuration errors.
Kernel configuration error example:
ausmbus* at aupsc0
auspi* at aupsc0
I'm at a loss.
What do you think about it?
--
Kind Regards,
--- shige
Shigeyuki Fukushima <shige@{FreeBSD,jp.FreeBSD,NetBSD}.org>