msm: kgsl: Consolidate sysfs store functions

Many of our sysfs _store hooks grok unsigned ints.  Use a common
function to replace the various sscanf() and strtoul() calls
scattered throughout the code.

Change-Id: Ic0dedbad792a300f97ba36882a4346d2dc28e521
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>

msm: kgsl: Avoid mixing signed and unsigned ints in kgsl_sysfs_store

kstrtou32 returns negative on error or 0 on success.  kgsl_sysfs_store
then proceeded to either return the negative value or the unsigned int
'count'.  Furthermore it compared the return value of kgsl_sysfs_store
against an unsigned int so streams were crossed everywhere.

Remove the uneeded count paramater, return 0 or negative from
kgsl_sysfs_store and handle it appropriately.

Change-Id: Ic0dedbad40e0b914cd06f5a9003a289d3307a14e
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>

msm: kgsl: Make sure the bus is on to consider power enabled

In theory only reg reads/writes should be using this check, and
they don't need the bus.  But just in case, make sure it is on
before allowing any activity.

Change-Id: I660fb947ad16e2872cfb95a9d99200a197b37f31
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
Revert "msm: kgsl: Consolidate sysfs store functions"

This reverts commit 7c33760a7432910fb64fbbfa3bd7abd022d2006d.

Revert "msm: kgsl: Making several static functions non-static"

This reverts commit 04294f792863539bb513ef2aa0588e8ca2a83721.

Revert "msm: kgsl: Hardcode pt_base value instead of using PAGE_OFFSET"

This reverts commit 2b123679b1e0ce63012296974cc0cac43f4e5039.

Revert "msm: kgsl: Assign maximum address range for CFF"

This reverts commit c1c2ee53b47a9229dbe10dcc11e3a72c95cb7c0a.

Revert "msm: kgsl: Print TTBR0 in the page fault message"

This reverts commit 36f1183c2c97d5121fc6c59b67680b7b156d0d00.

Revert "msm: kgsl: Change local vars being assigned from size_t to size_t"

This reverts commit 24762373a1ae2589fe12a684f053abd8c1e19756.

Revert "msm: kgsl: don't use sscanf()"

This reverts commit 48ca577498d7b56eafa286c7769b44acd5340a7c.

Revert "msm: kgsl: Change print specifier in kgsl_setup_ashmem"

This reverts commit 8640676be9d3a6a4a4da003ee809748afd8674d6.

Revert "msm: kgsl: store process comm name in kgsl_process_private"

This reverts commit 3bace064be6e06b27cd2fe42053874494a7cc4c2.

Revert "msm: kgsl: Reject free waittimestamp calls on incorrect parameters"

This reverts commit e971c700983933084db350b26e31e81581968aa5.

Revert "msm: kgsl: Changing to kref_get_unless_zero for process refcount"

This reverts commit cab4ca95405af216447c949fae50201422f1fe91.

Revert "msm: kgsl: Add struct kgsl_device to kgsl_allocate_contiguous API"

This reverts commit aa039c9f3b065e05f335b9a9dcb94ff4d6f21067.

Revert "msm: kgsl: Remove Z180 driver"

This reverts commit 35280719c5f13f3206e0c71bcf6348aa4d5492bc.

Revert "msm: kgsl: Remove A2XX support"

This reverts commit 48b4dec4e2e0b8443aafaf5f16b1d783b1577c81.

Revert "msm: kgsl: Remove adreno postmortem"

This reverts commit 8d56ed5cdbc1b4a77bd6effffe6ddef4dd60b3c3.

Revert "msm: kgsl: Clean-up unneeded power code"

This reverts commit 06fa0a39f338fede315325820a2dd893132765a4.

Revert "msm: kgsl: Add a timer to detect possible syncpoint deadlocks"

This reverts commit 67960514f11a30187a2e9a0d76f52bcad020458a.

Revert "msm: kgsl: Modify readtimestamp to return read status"

This reverts commit b44b6c47a56ed25e40b117c5938a5254359b6f52.

Revert "msm: kgsl: Remove now uneeded GPU event code"

This reverts commit afdf24916024fb7fabfd0c5c49fa900298731023.

Revert "msm: kgsl: The memory entry pending flag should be guarded"

This reverts commit 00a7b0fc2eabe98d2057f414e6dc791992e2f15d.

Revert "msm: kgsl: Do not detect faults when GPU core is idle"

This reverts commit d673790f663fca19538c1f818581d3a36eeed95d.

Revert "msm: kgsl: schedule dispatcher after canceling a fence wait"

This reverts commit a782b4ff0b67e4ff17bbbcf43790209cef80db79.

Revert "msm: kgsl: Add CFF capture for IBs"

This reverts commit d4dff6c2b0a58cb989f32162edbdbd123bc4a4e8.

Revert "msm: kgsl: Fix memleak in IOMMU clock disable"

This reverts commit 1dece98b318f103d8e6fd038520e4bf598f9d2b0.

Revert "msm: kgsl: Wait for dispatcher on adreno idle"

This reverts commit 8e1a107610f60d39159e988a645ac7efe89f5f32.

Revert "msm: kgsl: Remove the busy waiting loop from idle_check"

This reverts commit 7b9839fce8d45a5e8067b40b9ca9a0af0b3e070a.

Revert "msm: kgsl: Set BIMC vote limits by reading the bus table"

This reverts commit e3748ec31975182deb9f98c9cff7144862f7d70b.

Revert "msm: kgsl: Remove the frequency stepping work-around"

This reverts commit d35da08f5e14fca4e246d058d83618be7ebb688a.

Revert "msm: kgsl: Don't block on the dispatcher mutex in issuecmds"

This reverts commit cce5cd08adfae60401dda73bd513c371484c40f5.