Re: [PATCH 2/2] tsc2007: make platform callbacks optional

From: Richard Röjfors
Date: Thu Jul 09 2009 - 12:03:52 EST


On 6/25/09 11:23 PM, Andrew Morton wrote:
On Tue, 23 Jun 2009 13:54:54 +0200
Richard R__jfors<richard.rojfors.ext@xxxxxxxxxxxxxxx> wrote:

The platform callbacks are only called if supplied. Makes the driver
to fallback on only pressure calculation to decide when the pen is up.


Again, I don't understand the reason for the change from the above
description.

Is there some driver in the tree which does not implement
->get_pendown_state()? If so, it will oops, won't it? Which driver is
that?

Or is there some other driver which you're developing which does not
implement ->get_pendown_state()?

If the latter, why should the problem be solved in this way, rather
than implementing an empty ->get_pendown_state() within that driver?

On the board I'm currently writing drivers for we don't have any chance of getting the pendown state, we have to trust the touch controller, (which is not very accurate in all cases).

So we can not implement a dummy function, because there is no dummy default value to return. In that case the function must also do I2C calls to the touch controller, which is the responsibility of this driver.

--Richard
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/