linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* MAX3107 driver faulty
@ 2011-02-18 13:31 Nico Becker
  2011-02-18 14:00 ` Wolfram Sang
  0 siblings, 1 reply; 3+ messages in thread
From: Nico Becker @ 2011-02-18 13:31 UTC (permalink / raw)
  To: linux-serial

Hello,
i want to use the MAX3107 driver,
thats included in the kernel 2.6.37.

I think the driver is faulty.

I have done several changes,
before the driver works rudimentary.

I have check the datasheet and found
inconsistence between chip and driver.

In AutoCTS AutoRTS Mode the Register
txdisable and rxdisable should be set.
But txdisable isnt set, so the max3107 sends
data even the cts signal is high.

The IntOscen Flag (enable internal Oscilator) is never set.

Different register write operations are done in one stream.
Example: http://lxr.free-electrons.com/ident?a=arm;i=max3107_register_init
But in the datasheet it is explained:
"If the SPI burst address is different to 0x00, the MAX3107
automatically increments the register address after each SPI data
byte."
So it is impossible to write in the register 0x1D, 0x1C, 0x1B
in one stream.
after the first address 0x1D the maxim increment the address
automatically to 0x1E.


Have somebody test the driver,
or have although trouble with the chip?

Because i am really new with the kernel hacking,
what are the next steps, build an patch?

thanks a lot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: MAX3107 driver faulty
  2011-02-18 14:00 ` Wolfram Sang
@ 2011-02-18 13:54   ` Alan Cox
  0 siblings, 0 replies; 3+ messages in thread
From: Alan Cox @ 2011-02-18 13:54 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Nico Becker, linux-serial, jianwei.yang

> > Have somebody test the driver,
> > or have although trouble with the chip?
> 
> I haven't, but I'll add the people who brought the driver to the
> kernel to CC. Maybe they can comment.

It had some testing but in a limited configuration and mostly for a
device that then got canned. Thus I can well believe the autocts/rts
isn't set right, and IntOscen may well only get set if the firmware
happens to do it etc

> > Because i am really new with the kernel hacking,
> > what are the next steps, build an patch?
> 
> Doing patches (one per issue) might be an idea. It is usually easier
> to talk about code. Reading Documentation/SubmittingPatches will
> probably make the process easier.

I would probably send it as four patches

1. A patch for the IntOscen configuration
2. A patch to fix autocts/rts
3. A patch to fix the register updates
4. A patch to add any platform specific stuff you need for your device.

Thanks

Alan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: MAX3107 driver faulty
  2011-02-18 13:31 MAX3107 driver faulty Nico Becker
@ 2011-02-18 14:00 ` Wolfram Sang
  2011-02-18 13:54   ` Alan Cox
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfram Sang @ 2011-02-18 14:00 UTC (permalink / raw)
  To: Nico Becker; +Cc: linux-serial, jianwei.yang, alan

[-- Attachment #1: Type: text/plain, Size: 1736 bytes --]

On Fri, Feb 18, 2011 at 02:31:51PM +0100, Nico Becker wrote:
> Hello,
> i want to use the MAX3107 driver,
> thats included in the kernel 2.6.37.
> 
> I think the driver is faulty.
> 
> I have done several changes,
> before the driver works rudimentary.
> 
> I have check the datasheet and found
> inconsistence between chip and driver.
> 
> In AutoCTS AutoRTS Mode the Register
> txdisable and rxdisable should be set.
> But txdisable isnt set, so the max3107 sends
> data even the cts signal is high.
> 
> The IntOscen Flag (enable internal Oscilator) is never set.
> 
> Different register write operations are done in one stream.
> Example: http://lxr.free-electrons.com/ident?a=arm;i=max3107_register_init
> But in the datasheet it is explained:
> "If the SPI burst address is different to 0x00, the MAX3107
> automatically increments the register address after each SPI data
> byte."
> So it is impossible to write in the register 0x1D, 0x1C, 0x1B
> in one stream.
> after the first address 0x1D the maxim increment the address
> automatically to 0x1E.
> 
> 
> Have somebody test the driver,
> or have although trouble with the chip?

I haven't, but I'll add the people who brought the driver to the kernel
to CC. Maybe they can comment.


> Because i am really new with the kernel hacking,
> what are the next steps, build an patch?

Doing patches (one per issue) might be an idea. It is usually easier to
talk about code. Reading Documentation/SubmittingPatches will probably
make the process easier.

Thanks,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-18 14:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-18 13:31 MAX3107 driver faulty Nico Becker
2011-02-18 14:00 ` Wolfram Sang
2011-02-18 13:54   ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).