All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Jackson <ajax@redhat.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 6/6] drm/i915: Remove redundant bit shifting from intel_gmbus_set_speed
Date: Thu, 16 Jun 2011 16:36:28 -0400	[thread overview]
Message-ID: <1308256588-8026-6-git-send-email-ajax@redhat.com> (raw)
In-Reply-To: <1308256588-8026-1-git-send-email-ajax@redhat.com>

Signed-off-by: Adam Jackson <ajax@redhat.com>
---
 drivers/gpu/drm/i915/intel_i2c.c  |    8 +-------
 drivers/gpu/drm/i915/intel_sdvo.c |    2 +-
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c
index d3b903b..5d707c4 100644
--- a/drivers/gpu/drm/i915/intel_i2c.c
+++ b/drivers/gpu/drm/i915/intel_i2c.c
@@ -423,13 +423,7 @@ void intel_gmbus_set_speed(struct i2c_adapter *adapter, int speed)
 {
 	struct intel_gmbus *bus = to_intel_gmbus(adapter);
 
-	/* speed:
-	 * 0x0 = 100 KHz
-	 * 0x1 = 50 KHz
-	 * 0x2 = 400 KHz
-	 * 0x3 = 1000 Khz
-	 */
-	bus->reg0 = (bus->reg0 & ~(0x3 << 8)) | (speed << 8);
+	bus->reg0 = (bus->reg0 & ~(0x3 << 8)) | speed;
 }
 
 void intel_gmbus_force_bit(struct i2c_adapter *adapter, bool force_bit)
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index c2272f7..82296c3 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1951,7 +1951,7 @@ intel_sdvo_select_i2c_bus(struct drm_i915_private *dev_priv,
 
 	if (pin < GMBUS_NUM_PORTS) {
 		sdvo->i2c = &dev_priv->gmbus[pin].adapter;
-		intel_gmbus_set_speed(sdvo->i2c, GMBUS_RATE_1MHZ >> 8);
+		intel_gmbus_set_speed(sdvo->i2c, GMBUS_RATE_1MHZ);
 		intel_gmbus_force_bit(sdvo->i2c, true);
 	} else {
 		sdvo->i2c = &dev_priv->gmbus[GMBUS_PORT_DPB].adapter;
-- 
1.7.5.4

  parent reply	other threads:[~2011-06-16 20:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-16 20:36 [PATCH 1/6] drm/i915: Remove "i2c_speed" nonsense from child device table Adam Jackson
2011-06-16 20:36 ` [PATCH 2/6] drm/i915: Fix multifunction SDVO detection Adam Jackson
2011-06-16 20:44   ` Chris Wilson
2011-06-16 20:36 ` [PATCH 3/6] drm/i915: Rename intel_sdvo_hdmi_sink_detect Adam Jackson
2011-06-16 20:46   ` Chris Wilson
2011-06-16 20:36 ` [PATCH 4/6] drm/i915: Try harder on multifunction SDVO DDC Adam Jackson
2011-06-16 20:58   ` Chris Wilson
2011-10-20 20:51     ` Keith Packard
2012-04-15 23:10   ` Daniel Vetter
2012-04-16 14:01     ` Adam Jackson
2011-06-16 20:36 ` [PATCH 5/6] drm/i915: Delete a misleading comment Adam Jackson
2011-06-16 20:53   ` Chris Wilson
2011-06-16 20:36 ` Adam Jackson [this message]
2011-06-16 20:55   ` [PATCH 6/6] drm/i915: Remove redundant bit shifting from intel_gmbus_set_speed Chris Wilson
2011-06-16 20:44 ` [PATCH 1/6] drm/i915: Remove "i2c_speed" nonsense from child device table Chris Wilson
2011-09-22 14:00 ` Adam Jackson
2011-09-22 18:24   ` Keith Packard
2011-09-22 18:34     ` Adam Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1308256588-8026-6-git-send-email-ajax@redhat.com \
    --to=ajax@redhat.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.