linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Export symbol from I2C eeprom driver
@ 2005-01-08  5:34 Jon Smirl
  2005-01-08  5:53 ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Jon Smirl @ 2005-01-08  5:34 UTC (permalink / raw)
  To: lkml

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

Trivial patch to export a symbol from the eeprom driver. Currently
there are no exported symbols. The symbol lets the radeon DRM driver
link to it and modprobe will then force it to load along with the
radeon driver.

Signed off by: Jon Smirl <jonsmirl@gmail.com>

-- 
Jon Smirl
jonsmirl@gmail.com

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: eeprom.patch --]
[-- Type: text/x-patch; name="eeprom.patch", Size: 450 bytes --]

#signed off by: Jon Smirl <jonsmirl@gmail.com>
===== drivers/i2c/chips/eeprom.c 1.14 vs edited =====
--- 1.14/drivers/i2c/chips/eeprom.c	2004-11-08 19:37:27 -05:00
+++ edited/drivers/i2c/chips/eeprom.c	2005-01-08 00:27:54 -05:00
@@ -85,7 +85,8 @@
 	.detach_client	= eeprom_detach_client,
 };
 
-static int eeprom_id;
+int eeprom_id;
+EXPORT_SYMBOL(eeprom_id);
 
 static void eeprom_update_client(struct i2c_client *client, u8 slice)
 {

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

* Re: [PATCH] Export symbol from I2C eeprom driver
  2005-01-08  5:34 [PATCH] Export symbol from I2C eeprom driver Jon Smirl
@ 2005-01-08  5:53 ` Greg KH
  2005-01-08  6:08   ` Jon Smirl
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2005-01-08  5:53 UTC (permalink / raw)
  To: Jon Smirl; +Cc: lkml

On Sat, Jan 08, 2005 at 12:34:44AM -0500, Jon Smirl wrote:
> Trivial patch to export a symbol from the eeprom driver. Currently
> there are no exported symbols. The symbol lets the radeon DRM driver
> link to it and modprobe will then force it to load along with the
> radeon driver.

Why do you need this symbol?  Or are you just saying that you need the
eeprom driver loaded for some reason?

I say this as this variable is probably going to go away in the very
near future, as it isn't really needed at all.

thanks,

greg k-h

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

* Re: [PATCH] Export symbol from I2C eeprom driver
  2005-01-08  5:53 ` Greg KH
@ 2005-01-08  6:08   ` Jon Smirl
  2005-01-08 22:27     ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Jon Smirl @ 2005-01-08  6:08 UTC (permalink / raw)
  To: Greg KH; +Cc: lkml

On Fri, 7 Jan 2005 21:53:16 -0800, Greg KH <greg@kroah.com> wrote:
> On Sat, Jan 08, 2005 at 12:34:44AM -0500, Jon Smirl wrote:
> > Trivial patch to export a symbol from the eeprom driver. Currently
> > there are no exported symbols. The symbol lets the radeon DRM driver
> > link to it and modprobe will then force it to load along with the
> > radeon driver.
> 
> Why do you need this symbol?  Or are you just saying that you need the
> eeprom driver loaded for some reason?
> 
> I say this as this variable is probably going to go away in the very
> near future, as it isn't really needed at all.

I just need a symbol to force eeprom to load, it can be any symbol.  I
need something for the radeon driver to link to so that modprobe will
know to force eeprom to load when radeon is loaded. radeon is getting
hotplug code that needs the eeprom module loaded.

-- 
Jon Smirl
jonsmirl@gmail.com

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

* Re: [PATCH] Export symbol from I2C eeprom driver
  2005-01-08  6:08   ` Jon Smirl
@ 2005-01-08 22:27     ` Greg KH
  2005-01-09  0:14       ` Jon Smirl
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2005-01-08 22:27 UTC (permalink / raw)
  To: Jon Smirl; +Cc: lkml

On Sat, Jan 08, 2005 at 01:08:52AM -0500, Jon Smirl wrote:
> On Fri, 7 Jan 2005 21:53:16 -0800, Greg KH <greg@kroah.com> wrote:
> > On Sat, Jan 08, 2005 at 12:34:44AM -0500, Jon Smirl wrote:
> > > Trivial patch to export a symbol from the eeprom driver. Currently
> > > there are no exported symbols. The symbol lets the radeon DRM driver
> > > link to it and modprobe will then force it to load along with the
> > > radeon driver.
> > 
> > Why do you need this symbol?  Or are you just saying that you need the
> > eeprom driver loaded for some reason?
> > 
> > I say this as this variable is probably going to go away in the very
> > near future, as it isn't really needed at all.
> 
> I just need a symbol to force eeprom to load, it can be any symbol.  I
> need something for the radeon driver to link to so that modprobe will
> know to force eeprom to load when radeon is loaded. radeon is getting
> hotplug code that needs the eeprom module loaded.

Then why not try to load the module from your hotplug script?

And why do you need the eeprom driver for the radeon driver to work
properly?

thanks,

greg k-h

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

* Re: [PATCH] Export symbol from I2C eeprom driver
  2005-01-08 22:27     ` Greg KH
@ 2005-01-09  0:14       ` Jon Smirl
  2005-01-10 23:47         ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Jon Smirl @ 2005-01-09  0:14 UTC (permalink / raw)
  To: Greg KH; +Cc: lkml

On Sat, 8 Jan 2005 14:27:19 -0800, Greg KH <greg@kroah.com> wrote:
> And why do you need the eeprom driver for the radeon driver to work
> properly?

In the new radeon driver at hotplug time a user space app reads the
DDC from the monitor and sets the list of valid modes into the driver.
The radeon driver includes an I2C driver. The eeprom driver finds the
radeon DDC ROMs and makes them visible to the userspace driver through
sysfs. I could add code to the radeon driver to export the DDC ROMs to
sysfs but the eeprom driver works fine.

I don't want to load the driver from the script because the radeon
driver is creating a sysfs link into the eeprom directory from the
radeon one.

-- 
Jon Smirl
jonsmirl@gmail.com

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

* Re: [PATCH] Export symbol from I2C eeprom driver
  2005-01-09  0:14       ` Jon Smirl
@ 2005-01-10 23:47         ` Greg KH
  2005-01-11  2:20           ` Jon Smirl
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2005-01-10 23:47 UTC (permalink / raw)
  To: Jon Smirl; +Cc: lkml

On Sat, Jan 08, 2005 at 07:14:48PM -0500, Jon Smirl wrote:
> On Sat, 8 Jan 2005 14:27:19 -0800, Greg KH <greg@kroah.com> wrote:
> > And why do you need the eeprom driver for the radeon driver to work
> > properly?
> 
> In the new radeon driver at hotplug time a user space app reads the
> DDC from the monitor and sets the list of valid modes into the driver.
> The radeon driver includes an I2C driver. The eeprom driver finds the
> radeon DDC ROMs and makes them visible to the userspace driver through
> sysfs. I could add code to the radeon driver to export the DDC ROMs to
> sysfs but the eeprom driver works fine.
> 
> I don't want to load the driver from the script because the radeon
> driver is creating a sysfs link into the eeprom directory from the
> radeon one.

How are you getting the kobject to the eeprom directory from the radeon
driver?

thanks,

greg k-h

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

* Re: [PATCH] Export symbol from I2C eeprom driver
  2005-01-10 23:47         ` Greg KH
@ 2005-01-11  2:20           ` Jon Smirl
  2005-01-12 23:21             ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Jon Smirl @ 2005-01-11  2:20 UTC (permalink / raw)
  To: Greg KH; +Cc: lkml

On Mon, 10 Jan 2005 15:47:26 -0800, Greg KH <greg@kroah.com> wrote:
> > I don't want to load the driver from the script because the radeon
> > driver is creating a sysfs link into the eeprom directory from the
> > radeon one.
> 
> How are you getting the kobject to the eeprom directory from the radeon
> driver?
> 

I own the private I2C bus and eeprom is the only chip that will attach
to the bus. I need to do the link in the driver since there are four
busses and upto two monitors. The driver knows how to pair the head up
with the right bus.

if (dev_priv->primary_head.connector != ddc_none)
  list_for_each(item,
&dev_priv->i2c[dev_priv->primary_head.connector].adapter.clients) {
    client = list_entry(item, struct i2c_client, list);
    sysfs_create_link(&dev->primary.dev_class->kobj,
&client->dev.kobj, "monitor");
    break;
  }

-- 
Jon Smirl
jonsmirl@gmail.com

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

* Re: [PATCH] Export symbol from I2C eeprom driver
  2005-01-11  2:20           ` Jon Smirl
@ 2005-01-12 23:21             ` Greg KH
  0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2005-01-12 23:21 UTC (permalink / raw)
  To: Jon Smirl; +Cc: lkml

On Mon, Jan 10, 2005 at 09:20:49PM -0500, Jon Smirl wrote:
> On Mon, 10 Jan 2005 15:47:26 -0800, Greg KH <greg@kroah.com> wrote:
> > > I don't want to load the driver from the script because the radeon
> > > driver is creating a sysfs link into the eeprom directory from the
> > > radeon one.
> > 
> > How are you getting the kobject to the eeprom directory from the radeon
> > driver?
> > 
> 
> I own the private I2C bus and eeprom is the only chip that will attach
> to the bus. I need to do the link in the driver since there are four
> busses and upto two monitors. The driver knows how to pair the head up
> with the right bus.
> 
> if (dev_priv->primary_head.connector != ddc_none)
>   list_for_each(item,
> &dev_priv->i2c[dev_priv->primary_head.connector].adapter.clients) {
>     client = list_entry(item, struct i2c_client, list);
>     sysfs_create_link(&dev->primary.dev_class->kobj,
> &client->dev.kobj, "monitor");
>     break;
>   }

Ick.  Oh well, sure, that's ok.  But I really think that a Kconfig rule
could be made for this, instead of trying to pull an exported symbol in.

And I have a patch in my queue to delete that id, so you will have to
come up with another symbol in the driver to do that with :)

thanks,

greg k-h

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

end of thread, other threads:[~2005-01-12 23:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-08  5:34 [PATCH] Export symbol from I2C eeprom driver Jon Smirl
2005-01-08  5:53 ` Greg KH
2005-01-08  6:08   ` Jon Smirl
2005-01-08 22:27     ` Greg KH
2005-01-09  0:14       ` Jon Smirl
2005-01-10 23:47         ` Greg KH
2005-01-11  2:20           ` Jon Smirl
2005-01-12 23:21             ` Greg KH

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).