[linux-dvb] Leadtek WinFast DTV-1800H support
sustmidown at centrum.cz
Wed Oct 22 21:29:41 CEST 2008
>> Why is using of cx_write() risky?
> From my orig email: "Don't call cx_write() inside the gpio card setup, you're potentially destroying the other bits, it's risky."
>cx_write destroys the content of the GPIO direction-enablement and values bits. That's a bad thing, and can lead to unexpected behaviors if used generally in drivers.
>It's better to have a driver read the previous register value, and/or in the appropriate bit and write the value back to the gpio registers. This is what cx_set/clear do. That way parts of the driver can toggle GPIO's for important pieces, without having to understand GPIO usage in other disconnected/unrelated parts of the driver.
>Your patch uses set/clear, which is good.
More information about the linux-dvb