Skip to contentSkip to conversation

Patches to Marcelo and Linus

DISCUSSION Mark Studebaker 2 participants 4 messages May 19, 2005 I2C

lore
Share & tools
lore
#0 lore raw

yes, we would love your help.
Ingo was going to do it but has been busy - Ingo, do you have any work-in-progress to contribute?

There are 3 patches:
2.4 i2c
2.5 i2c
2.5 lm_sensors

Are you willing to do all 3?

Are you generating from our 2.6.3 or CVS? If CVS, I have some SMBus 2.0 work-in-progress in i2c-core that we may want to take out before submission.

Quoted 11 lines · Albert Cranford

Hello Philip,
Is there still a need to sync up to 2.4 and 2.5? I would be willing to help since I've done most of the work already. Its real easy using bitkeeper which is the revision control of the kernel.
Let me know.
Albert
--
Albert Cranford Deerfield Beach FL USA [email protected]

#1 lore raw

- I'm copying the i2c list to keep them informed.

- It's a good plan to start with 2.6.3, not CVS. Both because it's stable and because we have it tagged. In general, please don't submit patches from CVS before we talk about it.

- sensors in 2.4 was rejected by somebody a couple of years ago. We could try again but probably we should start with 2.5.

- I like the plan to start with an i2c patch for 2.5. sensors in 2.5 does _not_ require the i2c patch, but this way you get to say, 'hi, i'm the i2c/sensors patch guy, first is a small i2c patch, if you're happy with that then i'll send you the big sensors patch'.

- if you can post the proposed patch somewhere we can look at it

- Any thoughts on how we can buy back the changes for 2.5? Should we start doing #if KERNEL_VERSION > 2.5.0? Or should we do a 2.5-only version of mkpatch? Or both? Remember we support kernels 2.2+.

Quoted 58 lines · Albert Cranford
Quoted 45 lines · Juan Quintela
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

"albert" = Albert Cranford <[email protected]> writes:

Hi

Quoted 18 lines
Quoted 18 lines

yes, we would love your help.
Ingo was going to do it but has been busy - Ingo, do you have any work-in-progress to contribute?

There are 3 patches:
2.4 i2c
2.5 i2c
2.5 lm_sensors

Are you willing to do all 3?

Are you generating from our 2.6.3 or CVS? If CVS, I have some SMBus 2.0 work-in-progress in i2c-core that we may want to take out before submission.

Quoted 1 line · Albert Cranford
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines

Hello Philip,
Is there still a need to sync up to 2.4 and 2.5? I would be willing to help since I've done most of the work already. Its real easy using bitkeeper which is the revision control of the kernel.
Let me know.
Albert
--
Albert Cranford Deerfield Beach FL USA [email protected]

albert> Yes all three. I would get the 2.6.3 up to date first, albert> then get the CVS.
albert> But what about lm_sensors for 2.4 ? My personal 2.4 tree albert> has lots of lm_sensors in it.
albert> I'll start with a an i2c patch for 2.5 and pass it through albert> the group.

I am integrating lm_sensors through 2.4 in the Mandrake kernel, if you want, I can integrate it in 2.4, I have the patches and the test users :) Then you can integrate 2.5 branch.

Quoted 5 lines

Later, Juan.

--
In theory, practice and theory are the same, but in practice they are different -- Larry McVoy

OK I'll work on i2c & lm_sensors2 in 2.5. Are you also integrating i2c in 2.4?
--
Albert Cranford Deerfield Beach FL USA [email protected]

#2 lore raw
In reply to Mark Studebaker
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"albert" = Albert Cranford <[email protected]> writes:

Hi

Quoted 18 lines
Quoted 18 lines

yes, we would love your help.
Ingo was going to do it but has been busy - Ingo, do you have any work-in-progress to contribute?

There are 3 patches:
2.4 i2c
2.5 i2c
2.5 lm_sensors

Are you willing to do all 3?

Are you generating from our 2.6.3 or CVS? If CVS, I have some SMBus 2.0 work-in-progress in i2c-core that we may want to take out before submission.

Quoted 1 line · Albert Cranford
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines

Hello Philip,
Is there still a need to sync up to 2.4 and 2.5? I would be willing to help since I've done most of the work already. Its real easy using bitkeeper which is the revision control of the kernel.
Let me know.
Albert
--
Albert Cranford Deerfield Beach FL USA [email protected]

albert> Yes all three. I would get the 2.6.3 up to date first, albert> then get the CVS.
albert> But what about lm_sensors for 2.4 ? My personal 2.4 tree albert> has lots of lm_sensors in it.
albert> I'll start with a an i2c patch for 2.5 and pass it through albert> the group.

I am integrating lm_sensors through 2.4 in the Mandrake kernel, if you want, I can integrate it in 2.4, I have the patches and the test users :) Then you can integrate 2.5 branch.

Later, Juan.

Signature · 2 lines
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy
#3 lore raw
In reply to Mark Studebaker
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"albert" = Albert Cranford <[email protected]> writes:

Hi

albert> OK I'll work on i2c & lm_sensors2 in 2.5. Are you also albert> integrating i2c in 2.4?

i2c mkpatch, generates this parts in the patch that I think are wrong. could someone confirm that they are wrong?
I think that we should put that things on cvs, I am not sure if this should be there.

drivers/i2c/i2c-algo-bit.c +2 -2
@@ -50,5 +49,5 @@
 /* might not like this, as they have an internal timeout of some mils	*/
 /*
-#define SLO_IO      jif=jiffies;while(time_before_eq(jiffies, jif+i2c_table[minor].veryslow))\
+#define SLO_IO      jif=jiffies;while(jiffies<=jif+i2c_table[minor].veryslow)\
                         if (need_resched) schedule();
 */
@@ -118,5 +117,5 @@
  		 */
 		setscl(adap,1);
-		if (time_after_eq(jiffies, start+adap->timeout)) {
+		if (start+adap->timeout <= jiffies) {
 			return -ETIMEDOUT;
 		}

This change is bogus, time_after/time_before is the right interface.

drivers/i2c/i2c-elektor.c +1 -1
@@ -160,5 +160,5 @@
 
 
-static void __exit pcf_isa_exit(void)
+static void pcf_isa_exit(void)
 {
 	if (irq > 0) {

Other exit change.

drivers/i2c/i2c-elv.c +1 -1
@@ -116,5 +114,5 @@
 }
 
-static void __exit bit_elv_exit(void)
+static void bit_elv_exit(void)
 {
 	release_region( base , (base = 0x3bc)? 3 : 8 );

this should be marked exit, really.

drivers/i2c/i2c-proc.c +0 -4
@@ -120,8 +122,4 @@
 	}
 	*name = kmalloc(strlen(name_buffer) + 1, GFP_KERNEL);
-	if (!*name) {
-		printk (KERN_WARNING "i2c_create_name: not enough memory\n");
-		return -ENOMEM;
-	}
 	strcpy(*name, name_buffer);
 	return 0;

Removing than looks really bad, you need to check for no memory.

@@ -181,7 +179,8 @@

if (!(new_header = register_sysctl_table(new_table, 0))) {
+ printk(KERN_ERR "i2c-proc.o: error: sysctl interface not supported by kernel!\n");
kfree(new_table);
kfree(name);
- return -ENOMEM;
+ return -EPERM;
}

I am not sure about this change, ENOMEM looks more sane here, not sure about this.

drivers/i2c/i2c-velleman.c +1 -1
@@ -104,5 +103,5 @@
 }
 
-static void __exit bit_velle_exit(void)
+static void bit_velle_exit(void)
 {	
 	release_region( base , (base = 0x3bc)? 3 : 8 );

Why do you remove this s/__exit//?
THis function is only called from a exit funcion.

drivers/i2c/Config.in +3 -3
@@ -11,20 +11,14 @@
    dep_tristate 'I2C bit-banging interfaces'  CONFIG_I2C_ALGOBIT $CONFIG_I2C
    if [ "$CONFIG_I2C_ALGOBIT" != "n" ]; then
-      dep_tristate '  Philips style parallel port adapter' CONFIG_I2C_PHILIPSPAR $CONFIG_I2C_ALGOBIT $CONFIG_PARPORT
-      dep_tristate '  ELV adapter' CONFIG_I2C_ELV $CONFIG_I2C_ALGOBIT
-      dep_tristate '  Velleman K9000 adapter' CONFIG_I2C_VELLEMAN $CONFIG_I2C_ALGOBIT
+      dep_tristate '  Philips style parallel port adapter' CONFIG_I2C_BITLP $CONFIG_I2C_ALGOBIT $CONFIG_PARPORT
+      dep_tristate '  ELV adapter' CONFIG_I2C_BITELV $CONFIG_I2C_ALGOBIT
+      dep_tristate '  Velleman K9000 adapter' CONFIG_I2C_BITVELLE $CONFIG_I2C_ALGOBIT
 
 

Why s/PHILPSPAR/BITLP/?
Why s/ELV/BITELV/?
Why s/VELLEMAN/BITVELLE/?

-      dep_tristate '  Elektor ISA card' CONFIG_I2C_ELEKTOR $CONFIG_I2C_ALGOPCF
+      dep_tristate '  Elektor ISA card' CONFIG_I2C_PCFISA $CONFIG_I2C_ALGOPCF

Why this change s/ELEKTOR/PFCISA/?

- if [ "$CONFIG_MIPS_ITE8172" = "y" ]; then
- dep_tristate 'ITE I2C Algorithm' CONFIG_ITE_I2C_ALGO $CONFIG_I2C
- if [ "$CONFIG_ITE_I2C_ALGO" != "n" ]; then
- dep_tristate ' ITE I2C Adapter' CONFIG_ITE_I2C_ADAP $CONFIG_ITE_I2C_ALGO
- fi
- fi

i2c 2.6.3 don't have this driver either, and kernel has it.

@@ -40,13 +35,10 @@
fi

- if [ "$CONFIG_ALL_PPC" = "y" ] ; then
- dep_tristate 'Keywest I2C interface in Apple Core99 machines' CONFIG_I2C_KEYWEST $CONFIG_I2C
- fi
-

I2C don't have this driver :(

Signature · 2 lines
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy