summaryrefslogtreecommitdiff
path: root/util/pinmap/chips
diff options
context:
space:
mode:
Diffstat (limited to 'util/pinmap/chips')
-rw-r--r--util/pinmap/chips/it81302.go18
-rw-r--r--util/pinmap/chips/npcx993.go18
-rw-r--r--util/pinmap/chips/npcx993_test.go10
3 files changed, 0 insertions, 46 deletions
diff --git a/util/pinmap/chips/it81302.go b/util/pinmap/chips/it81302.go
index e7c8cf697d..6e593a2c5e 100644
--- a/util/pinmap/chips/it81302.go
+++ b/util/pinmap/chips/it81302.go
@@ -228,21 +228,3 @@ func (c *It81302) I2c(p string) string {
return ""
}
}
-
-// Pwm returns the configuration of this pin as a PWM.
-func (c *It81302) Pwm(p string) string {
- s, ok := it81302_pins[p]
- if ok {
- // Found the pin, now find the PWM name.
- for _, ss := range strings.Split(s, "/") {
- if strings.HasPrefix(ss, "PWM") && len(ss) > 3 {
- pwm := fmt.Sprintf("pwm%s", ss[3:])
- c.okay = append(c.okay, pwm)
- return fmt.Sprintf("%s %s", pwm, ss[3:])
- }
- }
- return ""
- } else {
- return ""
- }
-}
diff --git a/util/pinmap/chips/npcx993.go b/util/pinmap/chips/npcx993.go
index 58ee312d20..7a865c115d 100644
--- a/util/pinmap/chips/npcx993.go
+++ b/util/pinmap/chips/npcx993.go
@@ -228,21 +228,3 @@ func (c *Npcx993) I2c(p string) string {
return ""
}
}
-
-// Pwm returns the PWM config associated with this pin.
-func (c *Npcx993) Pwm(p string) string {
- s, ok := npcx993_pins[p]
- if ok {
- // Found the pin, now find the PWM name.
- for _, ss := range strings.Split(s, ",") {
- if strings.HasPrefix(ss, "PWM") && len(ss) > 3 {
- ch := ss[3:]
- c.okay = append(c.okay, fmt.Sprintf("pwm%s", ch))
- return fmt.Sprintf("pwm%s %s", ch, ch)
- }
- }
- return ""
- } else {
- return ""
- }
-}
diff --git a/util/pinmap/chips/npcx993_test.go b/util/pinmap/chips/npcx993_test.go
index fbed838804..6ed4bf2357 100644
--- a/util/pinmap/chips/npcx993_test.go
+++ b/util/pinmap/chips/npcx993_test.go
@@ -33,9 +33,6 @@ func TestMissing(t *testing.T) {
if gc != "" {
t.Errorf("Expected empty string, got %s %d for Gpio()", gc, gp)
}
- if n.Pwm(none) != "" {
- t.Errorf("Expected empty string, got %s for Pwm()", n.Pwm(none))
- }
if n.I2c(none) != "" {
t.Errorf("Expected empty string, got %s for I2c()", n.I2c(none))
}
@@ -52,16 +49,9 @@ func TestMulti(t *testing.T) {
if gc != "gpioe" || gp != 0 {
t.Errorf("Expected \"gpioe 0\", got %s %d for Gpio()", gc, gp)
}
- if n.Pwm(pin) != "" {
- t.Errorf("Expected empty string, got %s for Pwm()", n.Pwm(pin))
- }
if n.I2c(pin) != "" {
t.Errorf("Expected empty string, got %s for I2c()", n.I2c(pin))
}
- pin = "L9"
- if n.Pwm(pin) != "pwm4 4" {
- t.Errorf("Expected \"pwm4 4\", got %s for Pwm()", n.Pwm(pin))
- }
pin = "F8"
if n.I2c(pin) != "i2c3_0" {
t.Errorf("Expected \"i2c3_0\", got %s for I2c()", n.I2c(pin))