Re: [RFC 2/2] Input: phantom, add a new driver

2007-04-20 Thread Jiri Slaby
Andrew Morton napsal(a):
> On Tue, 17 Apr 2007 22:02:10 +0200 (CEST) Jiri Slaby <[EMAIL PROTECTED]> 
> wrote:
> 
>> phantom, add a new driver
[...]
>> +#define PHANTOM_VERSION "n0.9.4"
> 
> That's an impressive version number ;)

fork of 0.8 or so 2.4 linux driver -> the n in the meaning of new :)

>> +#define PHM_MAX_TORQUES 3
>> +
>> +#define PHN_CONTROL 0x6
>> +#define PHN_CTL_AMP 0x1
>> +#define PHN_CTL_BUT 0x2
>> +#define PHN_CTL_IRQ 0x10
>> +
>> +#define PHN_IRQCTL  0x4c
>> +
>> +#define PHN_ZERO_FORCE  2048
> 
> 

I have no clue too, cut&paste from sensable 2.4 driver. But I'll document as
much as possible.

>> +#define PCI_ENCODER(dev, axis) ((0 - (int)ioread32((dev)->iaddr + (axis))) 
>> & \
>> +0x)
> 
> Is there any reason why this cannot be a lower-cased inline C function? 
> Nicer to read, typesafe, etc.

yes, I'll switch it.

>> +#define PHB_RUNNING 1
>> +#define PHB_RESET   2
>> +
>> +static struct PH_CLASSTYPE *phantom_class;
> 
> I guess that PH_CLASSTYPE is some protect-me-from-gregkh compatibility
> thing.  But there isn't such a macro in the tree.  I switched this to plain
> old `class'.

Yes, my bad.

>> +
>> +static irqreturn_t phantom_isr(int irq, void *data)
>> +{
>> +struct phantom_device *dev = data;
>> +struct input_dev *idev = dev->idev;
>> +unsigned int a, hw_status;
>> +
>> +hw_status = ioread32(dev->iaddr + PHN_CONTROL);
>> +if (!(hw_status & PHN_CTL_IRQ))
>> +return IRQ_NONE;
>> +
>> +iowrite32(0, dev->iaddr);
>> +wmb();
>> +iowrite32(0xc0, dev->iaddr);
> 
> there too.

Seems reasonable, it can't be reordered. (I hope this holds on all archs.)

>> +if (unlikely(idev == NULL))
>> +return IRQ_HANDLED;
> 
> Can this happen?  If so, a comment explaining why would be nice.

In the case of DEBUG_SHIRQ=y. Comment will be added or better -- devinit code
reordered.

thanks for notes,
-- 
http://www.fi.muni.cz/~xslaby/Jiri Slaby
faculty of informatics, masaryk university, brno, cz
e-mail: jirislaby gmail com, gpg pubkey fingerprint:
B674 9967 0407 CE62 ACC8  22A0 32CC 55C3 39D4 7A7E


Winning Ticket: Reference Number: LRP/19-DE/9317

2007-04-20 Thread EURO MILLION
  EURO MILLION E-LOTTERY
  Ferdinand-Sauerbruch-Strasse2 
  DE-56073 Koblenz,
  9XF
  Germany. 
Reference Number: LRP/19-DE/9317
Batch: LRP/06/41
 
DEAR WINNER,
  
   We are pleased to inform you of the release, of the results of the EURO
MILLION E-LOTTERY held on the 06/4/2007, You were entered as dependent clients
with: Reference Number: LRP/19-DE/9317 and Batch number: LRP/06/41.Your email
address attached to the Ticket number: 15-23-29-41-48-03-06 drew the lucky
winning number, which consequently won the sweepstake in the first category, 
You have been approved for a payment of 1,000,000 Euro  (ONE MILLION EURO).
Please contact the fiduciary agent whose details are stated below to begin the
processing of your claim. Once again congratulation from the entire staffs of
Euro Million E-lottery. 

CONTACT;
Sir. Billy Moore
Foreign Services Manager,
Email: [EMAIL PROTECTED]  
 
 
Yours Sincerely,
MS GLORIA EDWARDS 
(Lottery Coordinator/Director)
EURO MILLION E-LOTTERY